ReactOS 0.4.16-dev-340-g0540c21
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}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
#define NULL
Definition: types.h:112
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ WbemPath_create()

HRESULT WbemPath_create ( LPVOID ppObj)

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 E_OUTOFMEMORY
Definition: ddrawi.h:100
static const struct IWbemPathVtbl path_vtbl
Definition: path.c:1242
static void init_path(struct path *path)
Definition: path.c:297
#define S_OK
Definition: intsafe.h:52
#define TRACE(s)
Definition: solgame.cpp:4
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:912
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:919
LONG refs
Definition: path.c:52
IWbemPath IWbemPath_iface
Definition: path.c:51
CRITICAL_SECTION cs
Definition: path.c:53
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define DWORD_PTR
Definition: treelist.c:76

◆ WbemStatusCodeText_create()

HRESULT WbemStatusCodeText_create ( LPVOID ppObj)

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 const struct IWbemStatusCodeTextVtbl status_code_vtbl
Definition: statuscode.c:124
IWbemStatusCodeText IWbemStatusCodeText_iface
Definition: statuscode.c:36