ReactOS 0.4.16-dev-340-g0540c21
ntobjfolder.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: NT Object Namespace shell extension
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: NT Object Namespace folder class implementation
5 * COPYRIGHT: Copyright 2015-2017 David Quintana <gigaherz@gmail.com>
6 */
7
8#include "precomp.h"
9
10#include <wine/unicode.h>
11
12// {845B0FB2-66E0-416B-8F91-314E23F7C12D}
13const GUID CLSID_NtObjectFolder = { 0x845b0fb2, 0x66e0, 0x416b, { 0x8f, 0x91, 0x31, 0x4e, 0x23, 0xf7, 0xc1, 0x2d } };
14
15// {F4C430C3-3A8D-4B56-A018-E598DA60C2E0}
16static const GUID GUID_NtObjectColumns = { 0xf4c430c3, 0x3a8d, 0x4b56, { 0xa0, 0x18, 0xe5, 0x98, 0xda, 0x60, 0xc2, 0xe0 } };
17
19{
24};
25
27 m_NtPath(NULL),
28 m_pcidlChild(NULL)
29{
30
31}
32
34{
35 if (m_pcidlChild)
37}
38
40{
41 m_NtPath = ntPath;
42 if (cidl != 1)
43 return E_INVALIDARG;
44 m_pcidlChild = ILClone(apidl[0]);
45 return S_OK;
46}
47
50 LPWSTR szIconFile,
52 INT *piIndex,
53 UINT *pwFlags)
54{
56
57 if ((entry->cb < sizeof(NtPidlEntry)) || (entry->magic != NT_OBJECT_PIDL_MAGIC))
58 return E_INVALIDARG;
59
60 UINT flags = 0;
61
62 switch (entry->objectType)
63 {
67 *piIndex = -((uFlags & GIL_OPENICON) ? IDI_NTOBJECTDIROPEN : IDI_NTOBJECTDIR);
68 *pwFlags = flags;
69 return S_OK;
70
71 case DEVICE_OBJECT:
73 *piIndex = -IDI_NTOBJECTDEVICE;
74 *pwFlags = flags;
75 return S_OK;
76
77 case PORT_OBJECT:
79 *piIndex = -IDI_NTOBJECTPORT;
80 *pwFlags = flags;
81 return S_OK;
82
83 case KEY_OBJECT:
85 *piIndex = -IDI_REGISTRYKEY;
86 *pwFlags = flags;
87 return S_OK;
88
89 default:
91 *piIndex = -IDI_NTOBJECTITEM;
92 *pwFlags = flags;
93 return S_OK;
94 }
95}
96
98 LPCWSTR pszFile,
99 UINT nIconIndex,
100 HICON *phiconLarge,
101 HICON *phiconSmall,
102 UINT nIconSize)
103{
104 return SHDefExtractIconW(pszFile, nIconIndex, 0, phiconLarge, phiconSmall, nIconSize);
105}
106
107//-----------------------------------------------------------------------------
108// CNtObjectFolder
109
111{
112}
113
115{
116}
117
118// IShellFolder
119
121 HWND hwndOwner,
122 SHCONTF grfFlags,
123 IEnumIDList **ppenumIDList)
124{
125 return GetEnumNTDirectory(m_NtPath, ppenumIDList);
126}
127
128BOOL STDMETHODCALLTYPE CNtObjectFolder::IsSymLink(const NtPidlEntry * info)
129{
130 return info->objectType == SYMBOLICLINK_OBJECT;
131}
132
134 const NtPidlEntry * info,
135 LPITEMIDLIST * fullPidl)
136{
137 WCHAR wbLink[MAX_PATH] = { 0 };
139 RtlInitEmptyUnicodeString(&link, wbLink, sizeof(wbLink));
140
141 *fullPidl = NULL;
142
145 return hr;
146
148
149 if (link.Length == 0)
150 return E_UNEXPECTED;
151
152 if (link.Buffer[1] == L':' && isalphaW(link.Buffer[0]))
153 {
154 StringCbCopyNW(path, sizeof(path), link.Buffer, link.Length);
155
156 CComPtr<IShellFolder> psfDesktop;
157 hr = SHGetDesktopFolder(&psfDesktop);
159 return hr;
160
161 return psfDesktop->ParseDisplayName(NULL, NULL, path, NULL, fullPidl, NULL);
162 }
163
164 StringCbCopyW(path, sizeof(path), L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{845B0FB2-66E0-416B-8F91-314E23F7C12D}");
165 PathAppend(path, link.Buffer);
166
167 CComPtr<IShellFolder> psfDesktop;
168 hr = SHGetDesktopFolder(&psfDesktop);
170 return hr;
171
172 LPITEMIDLIST pidl;
173
174 hr = psfDesktop->ParseDisplayName(NULL, NULL, path, NULL, &pidl, NULL);
175 if (FAILED(hr))
176 return hr;
177
178 *fullPidl = pidl;
179
180 DumpIdList(pidl);
181
182 return S_OK;
183}
184
186 PWSTR path,
187 const NtPidlEntry * info,
189 LPCITEMIDLIST rest,
190 LPITEMIDLIST fullPidl,
191 LPBC pbcReserved,
192 IShellFolder** ppsfChild)
193{
194
195 if (info->objectType == KEY_OBJECT)
196 {
197 return ShellObjectCreatorInit<CRegistryFolder>(fullPidl, path, (HKEY) NULL, IID_PPV_ARG(IShellFolder, ppsfChild));
198 }
199
200 return ShellObjectCreatorInit<CNtObjectFolder>(fullPidl, path, IID_PPV_ARG(IShellFolder, ppsfChild));
201}
202
203// IPersistFolder
205{
206 m_shellPidl = ILClone(pidl);
207
208 StringCbCopyW(m_NtPath, sizeof(m_NtPath), L"\\");
209
210 return S_OK;
211}
212
213// Internal
215{
216 m_shellPidl = ILClone(pidl);
217
218 StringCbCopyW(m_NtPath, sizeof(m_NtPath), ntPath);
219
220 return S_OK;
221}
222
224 UINT iColumn,
225 SHCOLSTATEF *pcsFlags)
226{
227 switch (iColumn)
228 {
231 return S_OK;
232
235 return S_OK;
236
239 return S_OK;
240 }
241
242 return E_INVALIDARG;
243}
244
246 LPCITEMIDLIST pidl,
247 const SHCOLUMNID *pscid,
248 VARIANT *pv)
249{
250 const NtPidlEntry * info;
251
252 TRACE("GetDetailsEx\n");
253
254 if (pidl)
255 {
256 HRESULT hr = GetInfoFromPidl(pidl, &info);
258 return hr;
259
260 static const GUID storage = PSGUID_STORAGE;
261 if (IsEqualGUID(pscid->fmtid, storage))
262 {
263 if (pscid->pid == PID_STG_NAME)
264 {
265 return MakeVariantString(pv, info->entryName);
266 }
267 else if (pscid->pid == PID_STG_STORAGETYPE)
268 {
269 if (info->objectType < 0)
270 {
271 NtPidlTypeData * td = (NtPidlTypeData*) (((PBYTE) info) + FIELD_OFFSET(NtPidlEntry, entryName) + info->entryNameLength + sizeof(WCHAR));
272
273 if (td->typeNameLength > 0)
274 {
275 return MakeVariantString(pv, td->typeName);
276 }
277 else
278 {
279 return MakeVariantString(pv, L"Unknown");
280 }
281 }
282 else
283 {
284 return MakeVariantString(pv, ObjectTypeNames[info->objectType]);
285 }
286 }
287 }
288 else if (IsEqualGUID(pscid->fmtid, GUID_NtObjectColumns))
289 {
290 if (pscid->pid == NTOBJECT_COLUMN_LINKTARGET && info->objectType == SYMBOLICLINK_OBJECT)
291 {
292 WCHAR wbLink[MAX_PATH] = { 0 };
294 RtlInitEmptyUnicodeString(&link, wbLink, sizeof(wbLink));
295
297
298 if (!FAILED_UNEXPECTEDLY(hr) && link.Length > 0)
299 {
300 return MakeVariantString(pv, link.Buffer);
301 }
302 }
303
304 V_VT(pv) = VT_EMPTY;
305 return S_OK;
306 }
307 }
308
309 return E_INVALIDARG;
310}
311
313 LPCITEMIDLIST pidl,
314 UINT iColumn,
315 SHELLDETAILS *psd)
316{
317 const NtPidlEntry * info;
318
319 TRACE("GetDetailsOf\n");
320
321 if (pidl)
322 {
323 HRESULT hr = GetInfoFromPidl(pidl, &info);
325 return hr;
326
327 switch (iColumn)
328 {
330 {
331 psd->fmt = LVCFMT_LEFT;
332
333 MakeStrRetFromString(info->entryName, info->entryNameLength, &(psd->str));
334 return S_OK;
335 }
336
338 {
339 psd->fmt = LVCFMT_LEFT;
340
341 if (info->objectType < 0)
342 {
343 NtPidlTypeData * td = (NtPidlTypeData*) (((PBYTE) info) + FIELD_OFFSET(NtPidlEntry, entryName) + info->entryNameLength + sizeof(WCHAR));
344
345 if (td->typeNameLength > 0)
347 else
348 MakeStrRetFromString(L"Unknown", &(psd->str));
349 }
350 else
351 MakeStrRetFromString(ObjectTypeNames[info->objectType], &(psd->str));
352 return S_OK;
353 }
354
356 {
357 psd->fmt = LVCFMT_LEFT;
358
359 if (info->objectType == SYMBOLICLINK_OBJECT)
360 {
361 WCHAR wbLink[MAX_PATH] = { 0 };
363 RtlInitEmptyUnicodeString(&link, wbLink, sizeof(wbLink));
364
366
367 if (!FAILED_UNEXPECTEDLY(hr) && link.Length > 0)
368 {
369 MakeStrRetFromString(link.Buffer, link.Length, &(psd->str));
370 return S_OK;
371 }
372 }
373
374 MakeStrRetFromString(L"", &(psd->str));
375 return S_OK;
376 }
377 }
378 }
379 else
380 {
381 switch (iColumn)
382 {
384 psd->fmt = LVCFMT_LEFT;
385 psd->cxChar = 30;
386
387 // TODO: Make localizable
388 MakeStrRetFromString(L"Object Name", &(psd->str));
389 return S_OK;
390
392 psd->fmt = LVCFMT_LEFT;
393 psd->cxChar = 20;
394
395 // TODO: Make localizable
396 MakeStrRetFromString(L"Object Type", &(psd->str));
397 return S_OK;
398
400 psd->fmt = LVCFMT_LEFT;
401 psd->cxChar = 30;
402
403 // TODO: Make localizable
404 MakeStrRetFromString(L"Symlink Target", &(psd->str));
405 return S_OK;
406 }
407 }
408
409 return E_INVALIDARG;
410}
411
413 UINT iColumn,
414 SHCOLUMNID *pscid)
415{
416 static const GUID storage = PSGUID_STORAGE;
417 switch (iColumn)
418 {
420 pscid->fmtid = storage;
421 pscid->pid = PID_STG_NAME;
422 return S_OK;
423
425 pscid->fmtid = storage;
426 pscid->pid = PID_STG_STORAGETYPE;
427 return S_OK;
428
432 return S_OK;
433 }
434 return E_INVALIDARG;
435}
436
438{
439 HRESULT hr;
440
441 DWORD sortMode = lParam & 0xFFFF0000;
442 DWORD column = lParam & 0x0000FFFF;
443
444 if (sortMode == SHCIDS_ALLFIELDS)
445 {
446 if (column != 0)
447 return E_INVALIDARG;
448
449 int minsize = min(first->cb, second->cb);
450 hr = MAKE_COMPARE_HRESULT(memcmp(second, first, minsize));
451 if (hr != S_EQUAL)
452 return hr;
453
454 return MAKE_COMPARE_HRESULT(second->cb - first->cb);
455 }
456
457 switch (column)
458 {
460 return CompareName(lParam, first, second);
461
463 return MAKE_COMPARE_HRESULT(second->objectType - first->objectType);
464
466 {
467 if (first->objectType != SYMBOLICLINK_OBJECT && second->objectType != SYMBOLICLINK_OBJECT)
468 return CompareName(lParam, first, second);
469
470 if (first->objectType != SYMBOLICLINK_OBJECT || second->objectType != SYMBOLICLINK_OBJECT)
471 return first->objectType != SYMBOLICLINK_OBJECT ? S_GREATERTHAN : S_LESSTHAN;
472
473 WCHAR wbLink1[MAX_PATH] = { 0 }, wbLink2[MAX_PATH] = { 0 };
474 UNICODE_STRING firstLink, secondLink;
475 RtlInitEmptyUnicodeString(&firstLink, wbLink1, sizeof(wbLink1));
476
478 return E_INVALIDARG;
479
480 RtlInitEmptyUnicodeString(&secondLink, wbLink2, sizeof(wbLink2));
481
483 return E_INVALIDARG;
484
485 return MAKE_COMPARE_HRESULT(RtlCompareUnicodeString(&firstLink, &secondLink, TRUE));
486 }
487 }
488
489 DbgPrint("Unsupported sorting mode.\n");
490 return E_INVALIDARG;
491}
492
493ULONG CNtObjectFolder::ConvertAttributes(const NtPidlEntry * entry, PULONG inMask)
494{
495 ULONG mask = inMask ? *inMask : 0xFFFFFFFF;
496 ULONG flags = SFGAO_HASPROPSHEET | SFGAO_CANLINK;
497
498 if (entry->objectType == DIRECTORY_OBJECT)
499 flags |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_BROWSABLE;
500
501 if (entry->objectType == SYMBOLICLINK_OBJECT)
502 flags |= SFGAO_LINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_BROWSABLE;
503
504 if (entry->objectType == KEY_OBJECT)
505 flags |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_BROWSABLE;
506
507 return flags & mask;
508}
509
510BOOL CNtObjectFolder::IsFolder(const NtPidlEntry * info)
511{
512 return (info->objectType == DIRECTORY_OBJECT) ||
513 (info->objectType == SYMBOLICLINK_OBJECT) ||
514 (info->objectType == KEY_OBJECT);
515}
516
518{
519 if (!pcidl)
520 {
521 DbgPrint("PCIDL is NULL\n");
522 return E_INVALIDARG;
523 }
524
525 NtPidlEntry * entry = (NtPidlEntry*) &(pcidl->mkid);
526 if (entry->cb < sizeof(NtPidlEntry))
527 {
528 DbgPrint("PCIDL too small %l (required %l)\n", entry->cb, sizeof(NtPidlEntry));
529 return E_INVALIDARG;
530 }
531
532 if (entry->magic != NT_OBJECT_PIDL_MAGIC)
533 {
534 DbgPrint("PCIDL magic mismatch %04x (expected %04x)\n", entry->magic, NT_OBJECT_PIDL_MAGIC);
535 return E_INVALIDARG;
536 }
537
538 *pentry = entry;
539 return S_OK;
540}
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define SHCIDS_ALLFIELDS
Definition: CFontExt.cpp:15
HINSTANCE g_hInstance
Definition: MainWindow.cpp:18
UINT cchMax
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
STDMETHOD() CompareName(LPARAM lParam, const NtPidlEntry *first, const NtPidlEntry *second)
Definition: foldercommon.h:290
STDMETHOD() Extract(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) override
Definition: ntobjfolder.cpp:97
virtual ~CNtObjectFolderExtractIcon()
Definition: ntobjfolder.cpp:33
HRESULT Initialize(LPCWSTR ntPath, PCIDLIST_ABSOLUTE parent, UINT cidl, PCUITEMID_CHILD_ARRAY apidl)
Definition: ntobjfolder.cpp:39
PCITEMID_CHILD m_pcidlChild
Definition: ntobjfolder.h:17
STDMETHOD() GetIconLocation(UINT uFlags, LPWSTR szIconFile, UINT cchMax, INT *piIndex, UINT *pwFlags) override
Definition: ntobjfolder.cpp:48
STDMETHOD() EnumObjects(HWND hwndOwner, SHCONTF grfFlags, IEnumIDList **ppenumIDList) override
STDMETHOD() GetDefaultColumnState(UINT iColumn, SHCOLSTATEF *pcsFlags) override
STDMETHOD() GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) override
STDMETHOD() Initialize(PCIDLIST_ABSOLUTE pidl) override
STDMETHOD() GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) override
virtual HRESULT GetInfoFromPidl(LPCITEMIDLIST pcidl, const NtPidlEntry **pentry)
STDMETHOD() ResolveSymLink(const NtPidlEntry *info, LPITEMIDLIST *fullPidl) override
STDMETHOD() MapColumnToSCID(UINT iColumn, SHCOLUMNID *pscid) override
STDMETHOD() InternalBindToObject(PWSTR path, const NtPidlEntry *info, LPITEMIDLIST first, LPCITEMIDLIST rest, LPITEMIDLIST fullPidl, LPBC pbcReserved, IShellFolder **ppsfChild) override
virtual ~CNtObjectFolder()
STDMETHOD() CompareIDs(LPARAM lParam, const NtPidlEntry *first, const NtPidlEntry *second) override
LPARAM lParam
Definition: combotst.c:139
const WCHAR * link
Definition: db.cpp:997
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define IDI_NTOBJECTDEVICE
Definition: resource.h:7
#define IDI_NTOBJECTPORT
Definition: resource.h:8
#define IDI_REGISTRYKEY
Definition: resource.h:9
#define IDI_NTOBJECTDIROPEN
Definition: resource.h:5
#define IDI_NTOBJECTDIR
Definition: resource.h:4
#define IDI_NTOBJECTITEM
Definition: resource.h:6
HRESULT INLINE MakeVariantString(VARIANT *pv, PCWSTR string)
Definition: util.h:22
HRESULT INLINE MakeStrRetFromString(LPCWSTR string, DWORD cbLength, STRRET *str)
Definition: util.h:7
UINT uFlags
Definition: api.c:59
#define MAX_PATH
Definition: compat.h:34
@ VT_EMPTY
Definition: compat.h:2295
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
r parent
Definition: btrfs.c:3010
struct _DEVICE_OBJECT DEVICE_OBJECT
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
Definition: string_lib.cpp:31
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLint GLuint mask
Definition: glext.h:6028
GLbitfield flags
Definition: glext.h:7161
const GLint * first
Definition: glext.h:5794
#define DbgPrint
Definition: hal.h:12
HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize)
Definition: iconcache.cpp:1009
DWORD SHCONTF
Definition: shobjidl.idl:187
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
uint32_t entry
Definition: isohybrid.c:63
static HICON
Definition: imagelist.c:80
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
const LPCWSTR ObjectTypeNames[]
Definition: ntobjenum.cpp:25
HRESULT GetEnumNTDirectory(LPCWSTR path, IEnumIDList **ppil)
Definition: ntobjenum.cpp:737
HRESULT GetNTObjectSymbolicLinkTarget(LPCWSTR path, LPCWSTR entryName, PUNICODE_STRING LinkTarget)
Definition: ntobjenum.cpp:151
@ KEY_OBJECT
Definition: ntobjenum.h:16
@ SYMBOLICLINK_OBJECT
Definition: ntobjenum.h:14
@ DIRECTORY_OBJECT
Definition: ntobjenum.h:14
@ PORT_OBJECT
Definition: ntobjenum.h:19
#define NT_OBJECT_PIDL_MAGIC
Definition: ntobjenum.h:25
const GUID CLSID_NtObjectFolder
Definition: ntobjfolder.cpp:13
NtObjectColumns
Definition: ntobjfolder.cpp:19
@ NTOBJECT_COLUMN_NAME
Definition: ntobjfolder.cpp:20
@ NTOBJECT_COLUMN_LINKTARGET
Definition: ntobjfolder.cpp:22
@ NTOBJECT_COLUMN_END
Definition: ntobjfolder.cpp:23
@ NTOBJECT_COLUMN_TYPE
Definition: ntobjfolder.cpp:21
static const GUID GUID_NtObjectColumns
Definition: ntobjfolder.cpp:16
#define PSGUID_STORAGE
Definition: ntquery.h:47
#define PID_STG_STORAGETYPE
Definition: ntquery.h:50
#define PID_STG_NAME
Definition: ntquery.h:56
#define L(x)
Definition: ntvdm.h:50
interface IBindCtx * LPBC
Definition: objfwd.h:18
#define V_VT(A)
Definition: oleauto.h:211
BYTE * PBYTE
Definition: pedump.c:66
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:1042
#define LVCFMT_LEFT
Definition: commctrl.h:2603
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define isalphaW(n)
Definition: unicode.h:54
#define S_LESSTHAN
Definition: shellutils.h:616
#define S_GREATERTHAN
Definition: shellutils.h:618
#define MAKE_COMPARE_HRESULT(x)
Definition: shellutils.h:619
#define S_EQUAL
Definition: shellutils.h:617
HRESULT hr
Definition: shlfolder.c:183
#define PathAppend
Definition: shlwapi.h:827
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
@ SHCOLSTATE_TYPE_STR
Definition: shtypes.idl:121
@ SHCOLSTATE_SLOW
Definition: shtypes.idl:126
@ SHCOLSTATE_ONBYDEFAULT
Definition: shtypes.idl:125
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
DWORD SHCOLSTATEF
Definition: shtypes.idl:142
#define TRACE(s)
Definition: solgame.cpp:4
STRSAFEAPI StringCbCopyNW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc, size_t cbToCopy)
Definition: strsafe.h:255
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
OBJECT_TYPE objectType
Definition: ntobjenum.h:37
USHORT cb
Definition: ntobjenum.h:33
WCHAR entryName[ANYSIZE_ARRAY]
Definition: ntobjenum.h:40
WCHAR typeName[ANYSIZE_ARRAY]
Definition: ntobjenum.h:46
USHORT typeNameLength
Definition: ntobjenum.h:45
STRRET str
Definition: shtypes.idl:108
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
LONG_PTR LPARAM
Definition: windef.h:208
#define E_UNEXPECTED
Definition: winerror.h:2456
#define IID_PPV_ARG(Itype, ppType)
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185