ReactOS  0.4.14-dev-593-g1793dcc
shellutils.h
Go to the documentation of this file.
1 /*
2  * Copyright 1999, 2000 Juergen Schmied
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #ifndef __ROS_SHELL_UTILS_H
20 #define __ROS_SHELL_UTILS_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
25 
26 static inline ULONG
27 Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...)
28 {
29  char szMsg[512];
30  char *szMsgStart;
31  const char *fname;
32  va_list vl;
33  ULONG uRet;
34 
35  fname = strrchr(filename, '\\');
36  if (fname == NULL)
37  {
38  fname = strrchr(filename, '/');
39  if (fname != NULL)
40  fname++;
41  }
42  else
43  fname++;
44 
45  if (fname == NULL)
46  fname = filename;
47 
48  szMsgStart = szMsg + sprintf(szMsg, "%s:%d: ", fname, line);
49 
50  va_start(vl, lpFormat);
51  uRet = (ULONG) vsprintf(szMsgStart, lpFormat, vl);
52  va_end(vl);
53 
54  OutputDebugStringA(szMsg);
55 
56  return uRet;
57 }
58 
59 #define DbgPrint(fmt, ...) \
60  Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
61 
62 #ifdef __cplusplus
63 # define IID_PPV_ARG(Itype, ppType) IID_##Itype, reinterpret_cast<void**>((static_cast<Itype**>(ppType)))
64 # define IID_NULL_PPV_ARG(Itype, ppType) IID_##Itype, NULL, reinterpret_cast<void**>((static_cast<Itype**>(ppType)))
65 #else
66 # define IID_PPV_ARG(Itype, ppType) IID_##Itype, (void**)(ppType)
67 # define IID_NULL_PPV_ARG(Itype, ppType) IID_##Itype, NULL, (void**)(ppType)
68 #endif
69 
70 #if 1
71 #define FAILED_UNEXPECTEDLY(hr) (FAILED(hr) && (Win32DbgPrint(__FILE__, __LINE__, "Unexpected failure %08x.\n", hr), TRUE))
72 #else
73 #define FAILED_UNEXPECTEDLY(hr) FAILED(hr)
74 #endif
75 
76 #ifdef __cplusplus
77 } /* extern "C" */
78 #endif /* defined(__cplusplus) */
79 
80 #ifdef __cplusplus
81 template <typename T>
82 class CComCreatorCentralInstance
83 {
84 private:
85  static IUnknown *s_pInstance;
86 
87 public:
88  static HRESULT WINAPI CreateInstance(void *pv, REFIID riid, LPVOID *ppv)
89  {
90  *ppv = NULL;
91  if (pv != NULL)
92  return CLASS_E_NOAGGREGATION;
93  if (!s_pInstance)
94  {
95  PVOID pObj;
96  HRESULT hr;
98  if (FAILED(hr))
99  return hr;
100  if (InterlockedCompareExchangePointer((PVOID *)&s_pInstance, pObj, NULL))
101  static_cast<IUnknown *>(pObj)->Release();
102  }
103  return s_pInstance->QueryInterface(riid, ppv);
104  }
105  static void Term()
106  {
107  if (s_pInstance)
108  {
109  s_pInstance->Release();
110  s_pInstance = NULL;
111  }
112  }
113 };
114 
115 template <typename T>
116 IUnknown *CComCreatorCentralInstance<T>::s_pInstance = NULL;
117 
118 #define DECLARE_CENTRAL_INSTANCE_NOT_AGGREGATABLE(x) \
119 public: \
120  typedef CComCreatorCentralInstance< ATL::CComObject<x> > _CreatorClass;
121 #endif
122 
123 #ifdef __cplusplus
124 template <class Base>
125 class CComDebugObject : public Base
126 {
127 public:
128  CComDebugObject(void * = NULL)
129  {
130 #if DEBUG_CCOMOBJECT_CREATION
131  DbgPrint("%S, this=%08p\n", __FUNCTION__, static_cast<Base*>(this));
132 #endif
133  _pAtlModule->Lock();
134  }
135 
136  virtual ~CComDebugObject()
137  {
138  this->FinalRelease();
139  _pAtlModule->Unlock();
140  }
141 
143  {
144  int rc = this->InternalAddRef();
145 #if DEBUG_CCOMOBJECT_REFCOUNTING
146  DbgPrint("%s, RefCount is now %d(--)! \n", __FUNCTION__, rc);
147 #endif
148  return rc;
149  }
150 
152  {
153  int rc = this->InternalRelease();
154 
155 #if DEBUG_CCOMOBJECT_REFCOUNTING
156  DbgPrint("%s, RefCount is now %d(--)! \n", __FUNCTION__, rc);
157 #endif
158 
159  if (rc == 0)
160  {
161 #if DEBUG_CCOMOBJECT_DESTRUCTION
162  DbgPrint("%s, RefCount reached 0 Deleting!\n", __FUNCTION__);
163 #endif
164  delete this;
165  }
166  return rc;
167  }
168 
170  {
171  return this->_InternalQueryInterface(iid, ppvObject);
172  }
173 
174  static HRESULT WINAPI CreateInstance(CComDebugObject<Base> **pp)
175  {
176  CComDebugObject<Base> *newInstance;
177  HRESULT hResult;
178 
179  ATLASSERT(pp != NULL);
180  if (pp == NULL)
181  return E_POINTER;
182 
183  hResult = E_OUTOFMEMORY;
184  newInstance = NULL;
185  ATLTRY(newInstance = new CComDebugObject<Base>());
186  if (newInstance != NULL)
187  {
188  newInstance->SetVoid(NULL);
189  newInstance->InternalFinalConstructAddRef();
190  hResult = newInstance->_AtlInitialConstruct();
191  if (SUCCEEDED(hResult))
192  hResult = newInstance->FinalConstruct();
193  if (SUCCEEDED(hResult))
194  hResult = newInstance->_AtlFinalConstruct();
195  newInstance->InternalFinalConstructRelease();
196  if (hResult != S_OK)
197  {
198  delete newInstance;
199  newInstance = NULL;
200  }
201  }
202  *pp = newInstance;
203  return hResult;
204  }
205 };
206 
207 #ifdef DEBUG_CCOMOBJECT
208 # define _CComObject CComDebugObject
209 #else
210 # define _CComObject CComObject
211 #endif
212 
213 template<class T>
214 void ReleaseCComPtrExpectZero(CComPtr<T>& cptr, BOOL forceRelease = FALSE)
215 {
216  if (cptr.p != NULL)
217  {
218  int nrc = cptr->Release();
219  if (nrc > 0)
220  {
221  DbgPrint("WARNING: Unexpected RefCount > 0 (%d)!\n", nrc);
222  if (forceRelease)
223  {
224  while (nrc > 0)
225  {
226  nrc = cptr->Release();
227  }
228  }
229  }
230  cptr.Detach();
231  }
232 }
233 
234 template<class T, class R>
235 HRESULT inline ShellDebugObjectCreator(REFIID riid, R ** ppv)
236 {
237  CComPtr<T> obj;
238  HRESULT hResult;
239 
240  if (ppv == NULL)
241  return E_POINTER;
242  *ppv = NULL;
243  ATLTRY(obj = new CComDebugObject<T>);
244  if (obj.p == NULL)
245  return E_OUTOFMEMORY;
246  hResult = obj->QueryInterface(riid, reinterpret_cast<void **>(ppv));
247  if (FAILED(hResult))
248  return hResult;
249  return S_OK;
250 }
251 
252 template<class T>
253 HRESULT inline ShellObjectCreator(REFIID riid, void ** ppv)
254 {
255  _CComObject<T> *pobj;
256  HRESULT hResult;
257 
258  hResult = _CComObject<T>::CreateInstance(&pobj);
259  if (FAILED(hResult))
260  return hResult;
261 
262  pobj->AddRef(); /* CreateInstance returns object with 0 ref count */
263 
264  hResult = pobj->QueryInterface(riid, reinterpret_cast<void **>(ppv));
265 
266  pobj->Release(); /* In case of failure the object will be released */
267 
268  return hResult;
269 }
270 
271 template<class T>
272 HRESULT inline ShellObjectCreatorInit(REFIID riid, void ** ppv)
273 {
274  _CComObject<T> *pobj;
275  HRESULT hResult;
276 
277  hResult = _CComObject<T>::CreateInstance(&pobj);
278  if (FAILED(hResult))
279  return hResult;
280 
281  pobj->AddRef(); /* CreateInstance returns object with 0 ref count */
282 
283  hResult = pobj->Initialize();
284 
285  if (SUCCEEDED(hResult))
286  hResult = pobj->QueryInterface(riid, reinterpret_cast<void **>(ppv));
287 
288  pobj->Release(); /* In case of failure the object will be released */
289 
290  return hResult;
291 }
292 
293 template<class T, class T1>
294 HRESULT inline ShellObjectCreatorInit(T1 initArg1, REFIID riid, void ** ppv)
295 {
296  _CComObject<T> *pobj;
297  HRESULT hResult;
298 
299  hResult = _CComObject<T>::CreateInstance(&pobj);
300  if (FAILED(hResult))
301  return hResult;
302 
303  pobj->AddRef(); /* CreateInstance returns object with 0 ref count */
304 
305  hResult = pobj->Initialize(initArg1);
306 
307  if (SUCCEEDED(hResult))
308  hResult = pobj->QueryInterface(riid, reinterpret_cast<void **>(ppv));
309 
310  pobj->Release(); /* In case of failure the object will be released */
311 
312  return hResult;
313 }
314 
315 template<class T, class T1, class T2>
316 HRESULT inline ShellObjectCreatorInit(T1 initArg1, T2 initArg2, REFIID riid, void ** ppv)
317 {
318  _CComObject<T> *pobj;
319  HRESULT hResult;
320 
321  hResult = _CComObject<T>::CreateInstance(&pobj);
322  if (FAILED(hResult))
323  return hResult;
324 
325  pobj->AddRef(); /* CreateInstance returns object with 0 ref count */
326 
327  hResult = pobj->Initialize(initArg1, initArg2);
328 
329  if (SUCCEEDED(hResult))
330  hResult = pobj->QueryInterface(riid, reinterpret_cast<void **>(ppv));
331 
332  pobj->Release(); /* In case of failure the object will be released */
333 
334  return hResult;
335 }
336 
337 template<class T, class T1, class T2, class T3>
338 HRESULT inline ShellObjectCreatorInit(T1 initArg1, T2 initArg2, T3 initArg3, REFIID riid, void ** ppv)
339 {
340  _CComObject<T> *pobj;
341  HRESULT hResult;
342 
343  hResult = _CComObject<T>::CreateInstance(&pobj);
344  if (FAILED(hResult))
345  return hResult;
346 
347  pobj->AddRef(); /* CreateInstance returns object with 0 ref count */
348 
349  hResult = pobj->Initialize(initArg1, initArg2, initArg3);
350 
351  if (SUCCEEDED(hResult))
352  hResult = pobj->QueryInterface(riid, reinterpret_cast<void **>(ppv));
353 
354  pobj->Release(); /* In case of failure the object will be released */
355 
356  return hResult;
357 }
358 
359 template<class T, class T1, class T2, class T3, class T4>
360 HRESULT inline ShellObjectCreatorInit(T1 initArg1, T2 initArg2, T3 initArg3, T4 initArg4, REFIID riid, void ** ppv)
361 {
362  _CComObject<T> *pobj;
363  HRESULT hResult;
364 
365  hResult = _CComObject<T>::CreateInstance(&pobj);
366  if (FAILED(hResult))
367  return hResult;
368 
369  pobj->AddRef(); /* CreateInstance returns object with 0 ref count */
370 
371  hResult = pobj->Initialize(initArg1, initArg2, initArg3, initArg4);
372 
373  if (SUCCEEDED(hResult))
374  hResult = pobj->QueryInterface(riid, reinterpret_cast<void **>(ppv));
375 
376  pobj->Release(); /* In case of failure the object will be released */
377 
378  return hResult;
379 }
380 
381 template<class T, class T1, class T2, class T3, class T4, class T5>
382 HRESULT inline ShellObjectCreatorInit(T1 initArg1, T2 initArg2, T3 initArg3, T4 initArg4, T5 initArg5, REFIID riid, void ** ppv)
383 {
384  _CComObject<T> *pobj;
385  HRESULT hResult;
386 
387  hResult = _CComObject<T>::CreateInstance(&pobj);
388  if (FAILED(hResult))
389  return hResult;
390 
391  pobj->AddRef(); /* CreateInstance returns object with 0 ref count */
392 
393  hResult = pobj->Initialize(initArg1, initArg2, initArg3, initArg4, initArg5);
394 
395  if (SUCCEEDED(hResult))
396  hResult = pobj->QueryInterface(riid, reinterpret_cast<void **>(ppv));
397 
398  pobj->Release(); /* In case of failure the object will be released */
399 
400  return hResult;
401 }
402 
403 HRESULT inline SHSetStrRet(LPSTRRET pStrRet, LPCSTR pstrValue)
404 {
405  pStrRet->uType = STRRET_CSTR;
406  strcpy(pStrRet->cStr, pstrValue);
407  return S_OK;
408 }
409 
410 HRESULT inline SHSetStrRet(LPSTRRET pStrRet, LPCWSTR pwstrValue)
411 {
412  SIZE_T cchr = wcslen(pwstrValue);
413  LPWSTR buffer = static_cast<LPWSTR>(CoTaskMemAlloc((cchr + 1) * sizeof(WCHAR)));
414  if (buffer == NULL)
415  return E_OUTOFMEMORY;
416 
417  pStrRet->uType = STRRET_WSTR;
418  pStrRet->pOleStr = buffer;
419  wcscpy(buffer, pwstrValue);
420  return S_OK;
421 }
422 
423 HRESULT inline SHSetStrRet(LPSTRRET pStrRet, HINSTANCE hInstance, DWORD resId)
424 {
426 
427  if (!LoadStringW(hInstance, resId, Buffer, MAX_PATH))
428  return E_FAIL;
429 
430  return SHSetStrRet(pStrRet, Buffer);
431 }
432 
433 static inline void DbgDumpMenuInternal(HMENU hmenu, char* padding, int padlevel)
434 {
435  WCHAR label[128];
436  int i;
438 
439  padding[padlevel] = '.';
440  padding[padlevel + 1] = '.';
441  padding[padlevel + 2] = 0;
442 
443  for (i = 0; i < count; i++)
444  {
445  MENUITEMINFOW mii = { 0 };
446 
447  mii.cbSize = sizeof(mii);
449  mii.dwTypeData = label;
450  mii.cch = _countof(label);
451 
452  GetMenuItemInfoW(hmenu, i, TRUE, &mii);
453 
454  if (mii.fType & MFT_BITMAP)
455  DbgPrint("%s%2d - %08x: BITMAP %08p (state=%d, has submenu=%s)\n", padding, i, mii.wID, mii.hbmpItem, mii.fState, mii.hSubMenu ? "TRUE" : "FALSE");
456  else if (mii.fType & MFT_SEPARATOR)
457  DbgPrint("%s%2d - %08x ---SEPARATOR---\n", padding, i, mii.wID);
458  else
459  DbgPrint("%s%2d - %08x: %S (state=%d, has submenu=%s)\n", padding, i, mii.wID, mii.dwTypeData, mii.fState, mii.hSubMenu ? "TRUE" : "FALSE");
460 
461  if (mii.hSubMenu)
462  DbgDumpMenuInternal(mii.hSubMenu, padding, padlevel + 2);
463 
464  }
465 
466  padding[padlevel] = 0;
467 }
468 
469 static __inline void DbgDumpMenu(HMENU hmenu)
470 {
471  char padding[128];
472  DbgDumpMenuInternal(hmenu, padding, 0);
473 }
474 
475 
476 static inline
477 void DumpIdList(LPCITEMIDLIST pcidl)
478 {
479  DbgPrint("Begin IDList Dump\n");
480 
481  for (; pcidl != NULL; pcidl = ILGetNext(pcidl))
482  {
483  int i;
484  int cb = pcidl->mkid.cb;
485  BYTE * sh = (BYTE*) &(pcidl->mkid);
486  if (cb == 0) // ITEMIDLISTs are terminatedwith a null SHITEMID.
487  break;
488  DbgPrint("Begin SHITEMID (cb=%d)\n", cb);
489  if ((cb & 3) != 0)
490  DbgPrint(" - WARNING: cb is not a multiple of 4\n");
491  for (i = 0; (i + 4) <= cb; i += 4)
492  {
493  DbgPrint(" - abID[%08x]: %02x %02x %02x %02x\n",
494  i,
495  sh[i + 0],
496  sh[i + 1],
497  sh[i + 2],
498  sh[i + 3]);
499  }
500  if (i < cb)
501  {
502  cb -= i;
503  if (cb == 3)
504  {
505  DbgPrint(" - abID[%08x]: %02x %02x %02x --\n",
506  i,
507  sh[i + 0],
508  sh[i + 1],
509  sh[i + 2]);
510  }
511  else if (cb == 2)
512  {
513  DbgPrint(" - abID[%08x]: %02x %02x -- --\n",
514  i,
515  sh[i + 0],
516  sh[i + 1]);
517  }
518  else if (cb == 1)
519  {
520  DbgPrint(" - abID[%08x]: %02x -- -- --\n",
521  i,
522  sh[i + 0]);
523  }
524  }
525  DbgPrint("End SHITEMID\n");
526  }
527  DbgPrint("End IDList Dump.\n");
528 }
529 
530 #endif /* __cplusplus */
531 
532 #define S_LESSTHAN 0xffff
533 #define S_EQUAL S_OK
534 #define S_GREATERTHAN S_FALSE
535 #define MAKE_COMPARE_HRESULT(x) ((x)>0 ? S_GREATERTHAN : ((x)<0 ? S_LESSTHAN : S_EQUAL))
536 
537 #endif /* __ROS_SHELL_UTILS_H */
#define ATLTRY(x)
Definition: atlcomcli.h:44
#define R(b, x)
Definition: sha2.c:134
#define MIIM_FTYPE
Definition: winuser.h:724
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
static HMENU hmenu
Definition: win.c:66
_In_ BOOLEAN Release
Definition: classpnp.h:929
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static HRESULT WINAPI CreateInstance(void *pv, REFIID riid, LPVOID *ppv)
Definition: atlcom.h:418
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
#define DbgPrint(fmt,...)
Definition: shellutils.h:59
REFIID riid
Definition: precomp.h:44
#define _countof(array)
Definition: fontsub.cpp:30
GLuint GLuint GLsizei count
Definition: gl.h:1545
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2343
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:851
REFIID LPVOID * ppv
Definition: atlbase.h:39
LPWSTR pOleStr
Definition: shtypes.idl:96
GLuint buffer
Definition: glext.h:5915
LPWSTR dwTypeData
Definition: winuser.h:3244
#define MFT_BITMAP
Definition: winuser.h:733
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
static ULONG Win32DbgPrint(const char *filename, int line, const char *lpFormat,...)
Definition: shellutils.h:27
NTSTATUS QueryInterface(IN PDEVICE_OBJECT DeviceObject, IN CONST GUID InterfaceType, IN LONG Size, IN LONG Version, OUT PVOID Interface)
Definition: fdo.c:532
const char * filename
Definition: ioapi.h:135
#define E_FAIL
Definition: ddrawi.h:102
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define STDMETHOD(m)
Definition: basetyps.h:62
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
#define sprintf(buf, format,...)
Definition: sprintf.c:55
char cStr[MAX_PATH]
Definition: shtypes.idl:98
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HINSTANCE hInstance
Definition: charmap.c:20
#define MIIM_SUBMENU
Definition: winuser.h:718
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define va_end(ap)
Definition: acmsvcex.h:90
#define MIIM_STATE
Definition: winuser.h:716
unsigned int BOOL
Definition: ntddk_ex.h:94
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
#define pp
Definition: hlsl.yy.c:1208
ULONG Release()
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:48
char * va_list
Definition: acmsvcex.h:78
Definition: bufpool.h:45
const char * LPCSTR
Definition: xmlstorage.h:183
#define MIIM_ID
Definition: winuser.h:717
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
unsigned int padding
Definition: isohybrid.c:50
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
#define MFT_SEPARATOR
Definition: winuser.h:739
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
unsigned char BYTE
Definition: mem.h:68
REFIID LPVOID * ppvObject
Definition: precomp.h:44
LPCWSTR lpFormat
Definition: trayclock.cpp:32
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
uint8_t label[11]
Definition: fsck.fat.h:65
short sh
Definition: format.c:272
#define MIIM_STRING
Definition: winuser.h:722
ULONG_PTR SIZE_T
Definition: typedefs.h:78
#define S_OK
Definition: intsafe.h:59
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
unsigned int ULONG
Definition: retypes.h:1
WCHAR * LPWSTR
Definition: xmlstorage.h:184
UINT uType
Definition: shtypes.idl:93
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define E_POINTER
Definition: winerror.h:2365
#define __FUNCTION__
Definition: types.h:112
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define SUCCEEDED(hr)
Definition: intsafe.h:57