shell32: Don't crash if the shlexec tests fail to create an extension in the registry.
[wine/gsoc_dplay.git] / include / wtypes.idl
blob8378012fd0ec1c262e0207faecbbabd8bfa4021e
1 /*
2 * Basic types used by COM interfaces
4 * Copyright 2002 Ove Kaaven
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 import "basetsd.h";
22 import "guiddef.h";
25 uuid(D3980A60-910C-1068-9341-00DD010F2F1C),
26 version(0.1),
27 pointer_default(unique)
30 interface IWinTypes
33 /******************** BASIC WIN32 TYPES ********************/
34 cpp_quote("#if 0 /* winnt.h */") /* don't redefine these */
36 typedef unsigned char BYTE;
37 typedef unsigned short WORD;
38 typedef unsigned long DWORD;
39 typedef long BOOL;
40 typedef unsigned char UCHAR;
41 typedef int INT;
42 typedef unsigned int UINT;
43 typedef short SHORT;
44 typedef unsigned short USHORT;
45 typedef long LONG;
46 typedef unsigned long ULONG;
47 typedef float FLOAT;
49 typedef void *PVOID, *LPVOID;
51 typedef DWORD *LPDWORD;
53 typedef char CHAR;
54 typedef [string] CHAR *LPSTR;
55 typedef [string] const CHAR *LPCSTR;
57 typedef wchar_t WCHAR;
58 typedef [string] WCHAR *LPWSTR;
59 typedef [string] const WCHAR *LPCWSTR;
61 typedef boolean BOOLEAN;
63 typedef DWORD COLORREF;
65 typedef void *HANDLE;
66 #define DECLARE_HANDLE(name) typedef void *name
67 #define DECLARE_WIREM_HANDLE(name) typedef [wire_marshal(wire##name)] void*name
69 DECLARE_HANDLE(HMODULE);
70 DECLARE_HANDLE(HINSTANCE);
71 DECLARE_HANDLE(HRGN);
72 DECLARE_HANDLE(HTASK);
73 DECLARE_HANDLE(HKEY);
74 DECLARE_HANDLE(HDESK);
75 DECLARE_HANDLE(HMF);
76 DECLARE_HANDLE(HEMF);
77 DECLARE_HANDLE(HPEN);
78 DECLARE_HANDLE(HRSRC);
79 DECLARE_HANDLE(HSTR);
80 DECLARE_HANDLE(HWINSTA);
81 DECLARE_HANDLE(HKL);
82 DECLARE_HANDLE(HGDIOBJ);
84 typedef HANDLE HDWP;
86 typedef LONG_PTR LRESULT;
88 typedef LONG HRESULT;
89 typedef DWORD LCID;
91 typedef unsigned __int64 DWORDLONG;
92 typedef __int64 LONGLONG;
93 typedef unsigned __int64 ULONGLONG;
95 typedef struct _LARGE_INTEGER {
96 LONGLONG QuadPart;
97 } LARGE_INTEGER;
99 typedef struct _ULARGE_INTEGER {
100 ULONGLONG QuadPart;
101 } ULARGE_INTEGER;
103 typedef struct _SID_IDENTIFIER_AUTHORITY {
104 UCHAR Value[6];
105 } SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
107 typedef struct _SID {
108 UCHAR Revision;
109 UCHAR SubAuthorityCount;
110 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
111 [size_is(SubAuthorityCount)] ULONG SubAuthority[*];
112 } SID, *PSID;
114 typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
116 typedef struct _ACL {
117 UCHAR AclRevision;
118 UCHAR Sbz1;
119 USHORT AclSize;
120 USHORT AceCount;
121 USHORT Sbz2;
122 } ACL;
123 typedef ACL *PACL;
125 typedef struct _SECURITY_DESCRIPTOR {
126 UCHAR Revision;
127 UCHAR Sbz1;
128 SECURITY_DESCRIPTOR_CONTROL Control;
129 PSID Owner;
130 PSID Group;
131 PACL Sacl;
132 PACL Dacl;
133 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
135 typedef struct _SECURITY_ATTRIBUTES
137 DWORD nLength;
138 [size_is(nLength)] LPVOID lpSecurityDescriptor;
139 BOOL bInheritHandle;
140 } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
142 typedef struct tagSIZE
144 LONG cx;
145 LONG cy;
146 } SIZE, *PSIZE, *LPSIZE;
147 typedef SIZE SIZEL, *PSIZEL, *LPSIZEL;
149 typedef struct tagPOINT
151 LONG x;
152 LONG y;
153 } POINT, *PPOINT, *LPPOINT;
155 typedef struct _POINTL
157 LONG x;
158 LONG y;
159 } POINTL, *PPOINTL;
161 typedef struct tagRECT
163 LONG left;
164 LONG top;
165 LONG right;
166 LONG bottom;
167 } RECT, *PRECT, *LPRECT;
168 typedef const RECT *LPCRECT;
170 typedef struct _RECTL
172 LONG left;
173 LONG top;
174 LONG right;
175 LONG bottom;
176 } RECTL, *PRECTL, *LPRECTL;
177 typedef const RECTL *LPCRECTL;
179 typedef UINT_PTR WPARAM;
180 typedef LONG_PTR LPARAM;
182 cpp_quote("#endif /* winnt.h */")
184 cpp_quote("#ifdef _MSC_VER") /* for IDL and MSVC only */
185 typedef double DOUBLE;
186 cpp_quote("#else")
187 cpp_quote("typedef double DECLSPEC_ALIGN(8) DOUBLE;")
188 cpp_quote("#endif")
190 cpp_quote("#ifndef _PALETTEENTRY_DEFINED")
191 cpp_quote("#define _PALETTEENTRY_DEFINED")
192 typedef struct tagPALETTEENTRY {
193 BYTE peRed;
194 BYTE peGreen;
195 BYTE peBlue;
196 BYTE peFlags;
197 } PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
198 cpp_quote("#endif")
200 cpp_quote("#ifndef _LOGPALETTE_DEFINED")
201 cpp_quote("#define _LOGPALETTE_DEFINED")
202 typedef struct tagLOGPALETTE
204 WORD palVersion;
205 WORD palNumEntries;
206 [size_is(palNumEntries)] PALETTEENTRY palPalEntry[*];
207 } LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
208 cpp_quote("#endif")
210 cpp_quote("#ifndef _SYSTEMTIME_")
211 cpp_quote("#define _SYSTEMTIME_")
212 typedef struct _SYSTEMTIME{
213 WORD wYear;
214 WORD wMonth;
215 WORD wDayOfWeek;
216 WORD wDay;
217 WORD wHour;
218 WORD wMinute;
219 WORD wSecond;
220 WORD wMilliseconds;
221 } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
222 cpp_quote("#endif")
224 cpp_quote("#ifndef _FILETIME_")
225 cpp_quote("#define _FILETIME_")
226 typedef struct _FILETIME {
227 DWORD dwLowDateTime;
228 DWORD dwHighDateTime;
229 } FILETIME, *PFILETIME, *LPFILETIME;
230 cpp_quote("#endif")
232 cpp_quote("#ifndef _TEXTMETRIC_DEFINED")
233 cpp_quote("#define _TEXTMETRIC_DEFINED")
234 typedef struct tagTEXTMETRICA
236 LONG tmHeight;
237 LONG tmAscent;
238 LONG tmDescent;
239 LONG tmInternalLeading;
240 LONG tmExternalLeading;
241 LONG tmAveCharWidth;
242 LONG tmMaxCharWidth;
243 LONG tmWeight;
244 LONG tmOverhang;
245 LONG tmDigitizedAspectX;
246 LONG tmDigitizedAspectY;
247 BYTE tmFirstChar;
248 BYTE tmLastChar;
249 BYTE tmDefaultChar;
250 BYTE tmBreakChar;
251 BYTE tmItalic;
252 BYTE tmUnderlined;
253 BYTE tmStruckOut;
254 BYTE tmPitchAndFamily;
255 BYTE tmCharSet;
256 } TEXTMETRICA, *LPTEXTMETRICA, *PTEXTMETRICA;
258 typedef struct tagTEXTMETRICW
260 LONG tmHeight;
261 LONG tmAscent;
262 LONG tmDescent;
263 LONG tmInternalLeading;
264 LONG tmExternalLeading;
265 LONG tmAveCharWidth;
266 LONG tmMaxCharWidth;
267 LONG tmWeight;
268 LONG tmOverhang;
269 LONG tmDigitizedAspectX;
270 LONG tmDigitizedAspectY;
271 WCHAR tmFirstChar;
272 WCHAR tmLastChar;
273 WCHAR tmDefaultChar;
274 WCHAR tmBreakChar;
275 BYTE tmItalic;
276 BYTE tmUnderlined;
277 BYTE tmStruckOut;
278 BYTE tmPitchAndFamily;
279 BYTE tmCharSet;
280 } TEXTMETRICW, *LPTEXTMETRICW, *PTEXTMETRICW;
281 cpp_quote("#endif")
283 /******************** BASIC COM/OLE TYPES ********************/
285 typedef WCHAR OLECHAR;
286 typedef [string] OLECHAR *LPOLESTR;
287 typedef [string] const OLECHAR *LPCOLESTR;
288 cpp_quote("#ifndef __WINESRC__")
289 cpp_quote("#define OLESTR(str) L##str")
290 cpp_quote("#endif")
292 typedef LONG SCODE;
294 typedef struct _COAUTHIDENTITY {
295 [size_is(UserLength+1)] USHORT *User;
296 ULONG UserLength;
297 [size_is(DomainLength+1)] USHORT *Domain;
298 ULONG DomainLength;
299 [size_is(PasswordLength+1)] USHORT *Password;
300 ULONG PasswordLength;
301 ULONG Flags;
302 } COAUTHIDENTITY;
304 typedef struct _COAUTHINFO {
305 DWORD dwAuthnSvc;
306 DWORD dwAuthzSvc;
307 LPWSTR pwszServerPrincName;
308 DWORD dwAuthnLevel;
309 DWORD dwImpersonationLevel;
310 COAUTHIDENTITY *pAuthIdentityData;
311 DWORD dwCapabilities;
312 } COAUTHINFO;
314 typedef enum tagMEMCTX {
315 MEMCTX_TASK = 1,
316 MEMCTX_SHARED = 2,
317 MEMCTX_MACSYSTEM = 3,
318 MEMCTX_UNKNOWN = -1,
319 MEMCTX_SAME = -2
320 } MEMCTX;
322 cpp_quote("#ifndef _ROT_COMPARE_MAX_DEFINED")
323 cpp_quote("#define _ROT_COMPARE_MAX_DEFINED")
324 cpp_quote("#define ROT_COMPARE_MAX 2048")
325 cpp_quote("#endif")
327 cpp_quote("#ifndef _ROTFLAGS_DEFINED")
328 cpp_quote("#define _ROTFLAGS_DEFINED")
329 cpp_quote("#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1")
330 cpp_quote("#define ROTFLAGS_ALLOWANYCLIENT 0x2")
331 cpp_quote("#endif")
333 typedef enum tagCLSCTX {
334 CLSCTX_INPROC_SERVER = 0x1,
335 CLSCTX_INPROC_HANDLER = 0x2,
336 CLSCTX_LOCAL_SERVER = 0x4,
337 CLSCTX_INPROC_SERVER16 = 0x8,
338 CLSCTX_REMOTE_SERVER = 0x10,
339 CLSCTX_INPROC_HANDLER16 = 0x20,
340 CLSCTX_INPROC_SERVERX86 = 0x40,
341 CLSCTX_INPROC_HANDLERX86 = 0x80,
342 CLSCTX_ESERVER_HANDLER = 0x100,
343 CLSCTX_NO_CODE_DOWNLOAD = 0x400,
344 CLSCTX_NO_CUSTOM_MARSHAL = 0x1000,
345 CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000,
346 CLSCTX_NO_FAILURE_LOG = 0x4000,
347 CLSCTX_DISABLE_AAA = 0x8000,
348 CLSCTX_ENABLE_AAA = 0x10000,
349 CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000
350 } CLSCTX;
352 cpp_quote("#define CLSCTX_INPROC (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER)")
353 cpp_quote("#define CLSCTX_ALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)")
354 cpp_quote("#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)")
356 typedef enum tagMSHLFLAGS {
357 MSHLFLAGS_NORMAL = 0,
358 MSHLFLAGS_TABLESTRONG = 1,
359 MSHLFLAGS_TABLEWEAK = 2,
360 MSHLFLAGS_NOPING = 4
361 } MSHLFLAGS;
363 typedef enum tagMSHCTX {
364 MSHCTX_LOCAL = 0,
365 MSHCTX_NOSHAREDMEM = 1,
366 MSHCTX_DIFFERENTMACHINE = 2,
367 MSHCTX_INPROC = 3,
368 MSHCTX_CROSSCTX = 4
369 } MSHCTX;
371 /******************** BLOB TYPES ********************/
373 typedef struct _BYTE_BLOB {
374 unsigned long clSize;
375 [size_is(clSize)] byte abData[];
376 } BYTE_BLOB;
377 typedef [unique] BYTE_BLOB *UP_BYTE_BLOB;
379 typedef struct _FLAGGED_BYTE_BLOB {
380 unsigned long fFlags;
381 unsigned long clSize;
382 [size_is(clSize)] byte abData[];
383 } FLAGGED_BYTE_BLOB;
384 typedef [unique] FLAGGED_BYTE_BLOB *UP_FLAGGED_BYTE_BLOB;
386 typedef struct _FLAGGED_WORD_BLOB {
387 unsigned long fFlags;
388 unsigned long clSize;
389 [size_is(clSize)] unsigned short asData[];
390 } FLAGGED_WORD_BLOB;
391 typedef [unique] FLAGGED_WORD_BLOB *UP_FLAGGED_WORD_BLOB;
393 typedef struct _BYTE_SIZEDARR {
394 unsigned long clSize;
395 [size_is(clSize)] byte *pData;
396 } BYTE_SIZEDARR;
398 typedef struct _SHORT_SIZEDARR {
399 unsigned long clSize;
400 [size_is(clSize)] unsigned short *pData;
401 } WORD_SIZEDARR;
403 typedef struct _LONG_SIZEDARR {
404 unsigned long clSize;
405 [size_is(clSize)] unsigned long *pData;
406 } DWORD_SIZEDARR;
408 typedef struct _HYPER_SIZEDARR {
409 unsigned long clSize;
410 [size_is(clSize)] hyper *pData;
411 } HYPER_SIZEDARR;
413 /******************** GDI TYPES ********************/
415 const unsigned long WDT_INPROC_CALL = 0x48746457;
416 const unsigned long WDT_REMOTE_CALL = 0x52746457;
417 const unsigned long WDT_INPROC64_CALL = 0x50746457;
419 typedef union _userCLIPFORMAT switch(long fContext) u {
420 case WDT_INPROC_CALL: DWORD dwValue;
421 case WDT_REMOTE_CALL: LPWSTR pwszName;
422 } userCLIPFORMAT;
424 typedef [unique] userCLIPFORMAT *wireCLIPFORMAT;
425 typedef [wire_marshal(wireCLIPFORMAT)] WORD CLIPFORMAT;
427 typedef struct tagRemHGLOBAL {
428 long fNullHGlobal;
429 unsigned long cbData;
430 [size_is(cbData)] byte data[];
431 } RemHGLOBAL;
433 typedef union _userHGLOBAL switch(long fContext) u {
434 case WDT_INPROC_CALL: long hInproc;
435 case WDT_REMOTE_CALL: FLAGGED_BYTE_BLOB *hRemote;
436 default: long hGlobal;
437 } userHGLOBAL;
439 typedef [unique] userHGLOBAL *wireHGLOBAL;
441 typedef struct tagRemHMETAFILEPICT {
442 long mm;
443 long xExt;
444 long yExt;
445 unsigned long cbData;
446 [size_is(cbData)] byte data[];
447 } RemHMETAFILEPICT;
449 typedef union _userHMETAFILE switch(long fContext) u {
450 case WDT_INPROC_CALL: long hInproc;
451 case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
452 default: long hGlobal;
453 } userHMETAFILE;
455 typedef [unique] userHMETAFILE *wireHMETAFILE;
457 typedef struct _remoteMETAFILEPICT {
458 long mm;
459 long xExt;
460 long yExt;
461 userHMETAFILE *hMF;
462 } remoteMETAFILEPICT;
464 typedef union _userHMETAFILEPICT switch(long fContext) u {
465 case WDT_INPROC_CALL: long hInproc;
466 case WDT_REMOTE_CALL: remoteMETAFILEPICT *hRemote;
467 default: long hGlobal;
468 } userHMETAFILEPICT;
470 typedef [unique] userHMETAFILEPICT *wireHMETAFILEPICT;
472 typedef struct tagRemHENHMETAFILE {
473 unsigned long cbData;
474 [size_is(cbData)] byte data[];
475 } RemHENHMETAFILE;
477 typedef union _userHENHMETAFILE switch(long fContext) u {
478 case WDT_INPROC_CALL: long hInproc;
479 case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
480 default: long hGlobal;
481 } userHENHMETAFILE;
483 typedef [unique] userHENHMETAFILE *wireHENHMETAFILE;
485 typedef struct tagRemHBITMAP
487 unsigned long cbData;
488 [size_is(cbData)] byte data[];
489 } RemHBITMAP;
491 typedef struct _userBITMAP {
492 LONG bmType;
493 LONG bmWidth;
494 LONG bmHeight;
495 LONG bmWidthBytes;
496 WORD bmPlanes;
497 WORD bmBitsPixel;
498 ULONG cbSize;
499 [size_is(cbSize)] byte pBuffer[];
500 } userBITMAP;
502 typedef union _userHBITMAP switch(long fContext) u {
503 case WDT_INPROC_CALL: long hInproc;
504 case WDT_REMOTE_CALL: userBITMAP *hRemote;
505 default: long hGlobal;
506 } userHBITMAP;
508 typedef [unique] userHBITMAP *wireHBITMAP;
510 typedef struct tagRemHPALETTE {
511 unsigned long cbData;
512 [size_is(cbData)] byte data[];
513 } RemHPALETTE;
515 typedef struct tagrpcLOGPALETTE {
516 WORD palVersion;
517 WORD palNumEntries;
518 [size_is(palNumEntries)] PALETTEENTRY palPalEntry[];
519 } rpcLOGPALETTE;
521 typedef union _userHPALETTE switch(long fContext) u {
522 case WDT_INPROC_CALL: long hInproc;
523 case WDT_REMOTE_CALL: rpcLOGPALETTE *hRemote;
524 default: long hGlobal;
525 } userHPALETTE;
527 typedef [unique] userHPALETTE *wireHPALETTE;
529 cpp_quote("#if 0")
530 DECLARE_WIREM_HANDLE(HGLOBAL);
531 typedef HGLOBAL HLOCAL;
532 DECLARE_WIREM_HANDLE(HBITMAP);
533 DECLARE_WIREM_HANDLE(HPALETTE);
534 DECLARE_WIREM_HANDLE(HENHMETAFILE);
535 DECLARE_WIREM_HANDLE(HMETAFILE);
536 cpp_quote("#endif")
537 DECLARE_WIREM_HANDLE(HMETAFILEPICT);
539 typedef union _RemotableHandle switch (long fContext) u
541 case WDT_INPROC_CALL: long hInproc;
542 case WDT_REMOTE_CALL: long hRemote;
543 } RemotableHandle;
545 typedef [unique] RemotableHandle *wireHACCEL;
546 typedef [unique] RemotableHandle *wireHBRUSH;
547 typedef [unique] RemotableHandle *wireHDC;
548 typedef [unique] RemotableHandle *wireHFONT;
549 typedef [unique] RemotableHandle *wireHICON;
550 typedef [unique] RemotableHandle *wireHMENU;
551 typedef [unique] RemotableHandle *wireHWND;
553 cpp_quote("#if 0") /* for IDL only (C/C++ defs are in windef.h) */
554 DECLARE_WIREM_HANDLE(HACCEL);
555 DECLARE_WIREM_HANDLE(HBRUSH);
556 DECLARE_WIREM_HANDLE(HDC);
557 DECLARE_WIREM_HANDLE(HFONT);
558 DECLARE_WIREM_HANDLE(HICON);
559 DECLARE_WIREM_HANDLE(HMENU);
560 DECLARE_WIREM_HANDLE(HWND);
562 typedef HICON HCURSOR;
564 typedef struct tagMSG
566 HWND hwnd;
567 UINT message;
568 WPARAM wParam;
569 LPARAM lParam;
570 DWORD time;
571 POINT pt;
572 } MSG, *PMSG, *NPMSG, *LPMSG;
574 cpp_quote("#endif")
576 /******************** GUID TYPES ********************/
578 cpp_quote("#if 0") /* for IDL only (C/C++ defs are in guiddef.h) */
579 typedef GUID *REFGUID;
580 typedef IID *REFIID;
581 typedef CLSID *REFCLSID;
582 typedef FMTID *REFFMTID;
583 cpp_quote("#endif")
585 /******************** MISC TYPES ********************/
587 typedef enum tagDVASPECT {
588 DVASPECT_CONTENT = 1,
589 DVASPECT_THUMBNAIL = 2,
590 DVASPECT_ICON = 4,
591 DVASPECT_DOCPRINT = 8
592 } DVASPECT;
594 typedef enum tagSTGC {
595 STGC_DEFAULT = 0,
596 STGC_OVERWRITE = 1,
597 STGC_ONLYIFCURRENT = 2,
598 STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
599 STGC_CONSOLIDATE = 8
600 } STGC;
602 typedef enum tagSTGMOVE {
603 STGMOVE_MOVE = 0,
604 STGMOVE_COPY = 1,
605 STGMOVE_SHALLOWCOPY = 2
606 } STGMOVE;
608 typedef enum tagSTATFLAG {
609 STATFLAG_DEFAULT = 0,
610 STATFLAG_NONAME = 1,
611 STATFLAG_NOOPEN = 2
612 } STATFLAG;
614 /******************** OLE Automation ********************/
616 cpp_quote("#ifdef _MSC_VER") /* for IDL and MSVC only */
617 typedef double DATE;
618 cpp_quote("#else")
619 cpp_quote("typedef double DECLSPEC_ALIGN(8) DATE;")
620 cpp_quote("#endif")
622 cpp_quote("#if 0") /* for IDL only */
623 typedef struct tagCY {
624 LONGLONG int64;
625 } CY;
626 cpp_quote("#else") /* C/C++ defs */
627 cpp_quote("#ifndef _tagCY_DEFINED")
628 cpp_quote("#define _tagCY_DEFINED")
629 cpp_quote("typedef union tagCY {")
630 cpp_quote(" struct {")
631 cpp_quote("#ifdef WORDS_BIGENDIAN")
632 cpp_quote(" LONG Hi;")
633 cpp_quote(" ULONG Lo;")
634 cpp_quote("#else")
635 cpp_quote(" ULONG Lo;")
636 cpp_quote(" LONG Hi;")
637 cpp_quote("#endif")
638 cpp_quote(" } DUMMYSTRUCTNAME;")
639 cpp_quote(" LONGLONG int64;")
640 cpp_quote("} CY;")
641 cpp_quote("#endif")
642 cpp_quote("#endif")
644 typedef CY *LPCY;
646 cpp_quote("#if 0") /* for IDL only */
647 typedef struct tagDEC {
648 USHORT wReserved;
649 BYTE scale;
650 BYTE sign;
651 ULONG Hi32;
652 ULONGLONG Lo64;
653 } DECIMAL;
654 cpp_quote("#else") /* C/C++ defs */
655 cpp_quote("typedef struct tagDEC {")
656 cpp_quote(" USHORT wReserved;")
657 cpp_quote(" union {")
658 cpp_quote(" struct {")
659 cpp_quote(" BYTE scale;")
660 cpp_quote(" BYTE sign;")
661 cpp_quote(" } DUMMYSTRUCTNAME;")
662 cpp_quote(" USHORT signscale;")
663 cpp_quote(" } DUMMYUNIONNAME;")
664 cpp_quote(" ULONG Hi32;")
665 cpp_quote(" union {")
666 cpp_quote(" struct {")
667 cpp_quote("#ifdef WORDS_BIGENDIAN")
668 cpp_quote(" ULONG Mid32;")
669 cpp_quote(" ULONG Lo32;")
670 cpp_quote("#else")
671 cpp_quote(" ULONG Lo32;")
672 cpp_quote(" ULONG Mid32;")
673 cpp_quote("#endif")
674 cpp_quote(" } DUMMYSTRUCTNAME1;")
675 cpp_quote(" ULONGLONG Lo64;")
676 cpp_quote(" } DUMMYUNIONNAME1;")
677 cpp_quote("} DECIMAL;")
678 cpp_quote("#endif")
679 cpp_quote("#define DECIMAL_NEG ((BYTE)0x80)")
680 cpp_quote("#define DECIMAL_SETZERO(d) do{ memset(((char*)&(d)) + sizeof(USHORT), 0, sizeof(ULONG) * 3u + sizeof(USHORT)); }while (0)")
682 typedef DECIMAL *LPDECIMAL;
684 typedef [unique] FLAGGED_WORD_BLOB *wireBSTR;
685 typedef [wire_marshal(wireBSTR)] OLECHAR *BSTR;
686 typedef BSTR *LPBSTR;
688 typedef short VARIANT_BOOL;
689 typedef VARIANT_BOOL _VARIANT_BOOL;
690 cpp_quote("#define VARIANT_TRUE ((VARIANT_BOOL)0xFFFF)")
691 cpp_quote("#define VARIANT_FALSE ((VARIANT_BOOL)0x0000)")
693 typedef struct tagBSTRBLOB {
694 ULONG cbSize;
695 [size_is(cbSize)] BYTE *pData;
696 } BSTRBLOB, *LPBSTRBLOB;
698 cpp_quote("#ifndef _tagBLOB_DEFINED")
699 cpp_quote("#define _tagBLOB_DEFINED")
700 cpp_quote("#define _BLOB_DEFINED")
701 cpp_quote("#define _LPBLOB_DEFINED")
702 typedef struct tagBLOB {
703 ULONG cbSize;
704 [size_is(cbSize)] BYTE *pBlobData;
705 } BLOB, *LPBLOB;
706 cpp_quote("#endif")
708 typedef struct tagCLIPDATA {
709 ULONG cbSize;
710 long ulClipFmt;
711 [size_is(cbSize-sizeof(long))] BYTE *pClipData;
712 } CLIPDATA;
713 cpp_quote("#define CBPCLIPDATA(cb) ((cb).cbSize - sizeof((cb).ulClipFmt))")
715 typedef ULONG PROPID;
717 /******************** VARTYPE ********************/
719 typedef unsigned short VARTYPE;
720 enum VARENUM {
721 VT_EMPTY = 0,
722 VT_NULL = 1,
723 VT_I2 = 2,
724 VT_I4 = 3,
725 VT_R4 = 4,
726 VT_R8 = 5,
727 VT_CY = 6,
728 VT_DATE = 7,
729 VT_BSTR = 8,
730 VT_DISPATCH = 9,
731 VT_ERROR = 10,
732 VT_BOOL = 11,
733 VT_VARIANT = 12,
734 VT_UNKNOWN = 13,
735 VT_DECIMAL = 14,
736 VT_I1 = 16,
737 VT_UI1 = 17,
738 VT_UI2 = 18,
739 VT_UI4 = 19,
740 VT_I8 = 20,
741 VT_UI8 = 21,
742 VT_INT = 22,
743 VT_UINT = 23,
744 VT_VOID = 24,
745 VT_HRESULT = 25,
746 VT_PTR = 26,
747 VT_SAFEARRAY = 27,
748 VT_CARRAY = 28,
749 VT_USERDEFINED = 29,
750 VT_LPSTR = 30,
751 VT_LPWSTR = 31,
752 VT_RECORD = 36,
753 VT_INT_PTR = 37,
754 VT_UINT_PTR = 38,
755 VT_FILETIME = 64,
756 VT_BLOB = 65,
757 VT_STREAM = 66,
758 VT_STORAGE = 67,
759 VT_STREAMED_OBJECT = 68,
760 VT_STORED_OBJECT = 69,
761 VT_BLOB_OBJECT = 70,
762 VT_CF = 71,
763 VT_CLSID = 72,
764 VT_VERSIONED_STREAM= 73,
765 VT_BSTR_BLOB = 0x0fff,
766 VT_VECTOR = 0x1000,
767 VT_ARRAY = 0x2000,
768 VT_BYREF = 0x4000,
769 VT_RESERVED = 0x8000,
770 VT_ILLEGAL = 0xffff,
771 VT_ILLEGALMASKED = 0x0fff,
772 VT_TYPEMASK = 0x0fff
775 typedef struct tagCSPLATFORM
777 DWORD dwPlatformId;
778 DWORD dwVersionHi;
779 DWORD dwVersionLo;
780 DWORD dwProcessorArch;
781 } CSPLATFORM;
783 typedef struct tagQUERYCONTEXT
785 DWORD dwContext;
786 CSPLATFORM Platform;
787 LCID Locale;
788 DWORD dwVersionHi;
789 DWORD dwVersionLo;
790 } QUERYCONTEXT;
792 typedef [v1_enum] enum tagTYSPEC
794 TYSPEC_CLSID,
795 TYSPEC_FILEEXT,
796 TYSPEC_MIMETYPE,
797 TYSPEC_PROGID,
798 TYSPEC_FILENAME,
799 TYSPEC_PACKAGENAME,
800 TYSPEC_OBJECTID
801 } TYSPEC;
803 typedef union switch(DWORD tyspec)
805 case TYSPEC_CLSID:
806 CLSID clsid;
807 case TYSPEC_FILEEXT:
808 LPOLESTR pFileExt;
809 case TYSPEC_MIMETYPE:
810 LPOLESTR pMimeType;
811 case TYSPEC_PROGID:
812 LPOLESTR pProgId;
813 case TYSPEC_FILENAME:
814 LPOLESTR pFileName;
815 case TYSPEC_PACKAGENAME:
816 struct
818 LPOLESTR pPackageName;
819 GUID PolicyId;
820 } ByName;
821 case TYSPEC_OBJECTID:
822 struct
824 GUID ObjectId;
825 GUID PolicyId;
826 } ByObjectId;
827 } uCLSSPEC;
829 } /* interface IWinTypes */