ReactOS  0.4.15-dev-326-g1c504f4
wmiutils_private.h File Reference
#include "wine/heap.h"
Include dependency graph for wmiutils_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

HRESULT WbemPath_create (LPVOID *) DECLSPEC_HIDDEN
 
HRESULT WbemStatusCodeText_create (LPVOID *) DECLSPEC_HIDDEN
 
static WCHARstrdupW (const WCHAR *src)
 

Function Documentation

◆ strdupW()

static WCHAR* strdupW ( const WCHAR src)
inlinestatic

Definition at line 24 of file wmiutils_private.h.

25 {
26  WCHAR *dst;
27  if (!src) return NULL;
28  if ((dst = heap_alloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src );
29  return dst;
30 }
#define lstrlenW
Definition: compat.h:416
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLenum src
Definition: glext.h:6340
#define lstrcpyW
Definition: compat.h:415
GLenum GLenum dst
Definition: glext.h:6340

◆ WbemPath_create()

HRESULT WbemPath_create ( LPVOID )

Definition at line 1275 of file path.c.

1276 {
1277  struct path *path;
1278 
1279  TRACE("%p\n", ppObj);
1280 
1281  if (!(path = heap_alloc( sizeof(*path) ))) return E_OUTOFMEMORY;
1282 
1283  path->IWbemPath_iface.lpVtbl = &path_vtbl;
1284  path->refs = 1;
1286  path->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": wmiutils_path.cs");
1287  init_path( path );
1288 
1289  *ppObj = &path->IWbemPath_iface;
1290 
1291  TRACE("returning iface %p\n", *ppObj);
1292  return S_OK;
1293 }
#define DWORD_PTR
Definition: treelist.c:76
LONG refs
Definition: path.c:52
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
const char * path
Definition: path.c:46
#define TRACE(s)
Definition: solgame.cpp:4
CRITICAL_SECTION cs
Definition: path.c:53
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:872
#define S_OK
Definition: intsafe.h:59
static void init_path(struct path *path)
Definition: path.c:297
IWbemPath IWbemPath_iface
Definition: path.c:51
static const struct IWbemPathVtbl path_vtbl
Definition: path.c:1242
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:865

◆ WbemStatusCodeText_create()

HRESULT WbemStatusCodeText_create ( LPVOID )

Definition at line 133 of file statuscode.c.

134 {
135  status_code *sc;
136 
137  TRACE("(%p)\n", ppObj);
138 
139  if (!(sc = heap_alloc( sizeof(*sc) ))) return E_OUTOFMEMORY;
140 
142  sc->refs = 1;
143 
144  *ppObj = &sc->IWbemStatusCodeText_iface;
145 
146  TRACE("returning iface %p\n", *ppObj);
147  return S_OK;
148 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const struct IWbemStatusCodeTextVtbl status_code_vtbl
Definition: statuscode.c:124
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
IWbemStatusCodeText IWbemStatusCodeText_iface
Definition: statuscode.c:36