Use proper return values in amstream stub functions.
[wine.git] / include / wtypes.idl
blob8f5a1e459869b1a53620ddcca69486db1beba8d5
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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(HACCEL);
70 DECLARE_HANDLE(HDC);
71 DECLARE_HANDLE(HFONT);
72 DECLARE_HANDLE(HWND);
73 DECLARE_HANDLE(HMENU);
74 DECLARE_HANDLE(HMODULE);
75 DECLARE_HANDLE(HINSTANCE);
76 DECLARE_HANDLE(HRGN);
77 DECLARE_HANDLE(HTASK);
78 DECLARE_HANDLE(HKEY);
79 DECLARE_HANDLE(HICON);
81 typedef LONG_PTR LRESULT;
83 typedef LONG HRESULT;
84 typedef DWORD LCID;
86 typedef unsigned __int64 DWORDLONG;
87 typedef __int64 LONGLONG;
88 typedef unsigned __int64 ULONGLONG;
90 typedef struct _LARGE_INTEGER {
91 LONGLONG QuadPart;
92 } LARGE_INTEGER;
94 typedef struct _ULARGE_INTEGER {
95 ULONGLONG QuadPart;
96 } ULARGE_INTEGER;
98 typedef struct _SID_IDENTIFIER_AUTHORITY {
99 UCHAR Value[6];
100 } SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
102 typedef struct _SID {
103 UCHAR Revision;
104 UCHAR SubAuthorityCount;
105 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
106 [size_is(SubAuthorityCount)] ULONG SubAuthority[*];
107 } SID, *PSID;
109 typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
111 typedef struct _ACL {
112 UCHAR AclRevision;
113 UCHAR Sbz1;
114 USHORT AclSize;
115 USHORT AceCount;
116 USHORT Sbz2;
117 } ACL;
118 typedef ACL *PACL;
120 typedef struct _SECURITY_DESCRIPTOR {
121 UCHAR Revision;
122 UCHAR Sbz1;
123 SECURITY_DESCRIPTOR_CONTROL Control;
124 PSID Owner;
125 PSID Group;
126 PACL Sacl;
127 PACL Dacl;
128 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
130 typedef struct _SECURITY_ATTRIBUTES
132 DWORD nLength;
133 LPVOID lpSecurityDescriptor;
134 BOOL bInheritHandle;
135 } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
137 typedef struct tagSIZE
139 LONG cx;
140 LONG cy;
141 } SIZE, *PSIZE, *LPSIZE;
142 typedef SIZE SIZEL, *PSIZEL, *LPSIZEL;
144 typedef struct tagPOINT
146 LONG x;
147 LONG y;
148 } POINT, *PPOINT, *LPPOINT;
150 typedef struct _POINTL
152 LONG x;
153 LONG y;
154 } POINTL, *PPOINTL;
156 typedef struct tagRECT
158 LONG left;
159 LONG top;
160 LONG right;
161 LONG bottom;
162 } RECT, *PRECT, *LPRECT;
163 typedef const RECT *LPCRECT;
165 typedef struct _RECTL
167 LONG left;
168 LONG top;
169 LONG right;
170 LONG bottom;
171 } RECTL, *PRECTL, *LPRECTL;
172 typedef const RECTL *LPCRECTL;
174 typedef UINT_PTR WPARAM;
175 typedef LONG_PTR LPARAM;
177 typedef struct tagMSG
179 HWND hwnd;
180 UINT message;
181 WPARAM wParam;
182 LPARAM lParam;
183 DWORD time;
184 POINT pt;
185 } MSG, *PMSG, *NPMSG, *LPMSG;
187 cpp_quote("#endif /* winnt.h */")
189 cpp_quote("#if 0") /* for IDL only */
190 typedef double DOUBLE;
191 cpp_quote("#else")
192 cpp_quote("typedef double DECLSPEC_ALIGN(8) DOUBLE;")
193 cpp_quote("#endif")
195 cpp_quote("#ifndef _PALETTEENTRY_DEFINED")
196 cpp_quote("#define _PALETTEENTRY_DEFINED")
197 typedef struct tagPALETTEENTRY {
198 BYTE peRed;
199 BYTE peGreen;
200 BYTE peBlue;
201 BYTE peFlags;
202 } PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
203 cpp_quote("#endif")
205 cpp_quote("#ifndef _LOGPALETTE_DEFINED")
206 cpp_quote("#define _LOGPALETTE_DEFINED")
207 typedef struct tagLOGPALETTE
209 WORD palVersion;
210 WORD palNumEntries;
211 [size_is(palNumEntries)] PALETTEENTRY palPalEntry[*];
212 } LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
213 cpp_quote("#endif")
215 cpp_quote("#ifndef _FILETIME_")
216 cpp_quote("#define _FILETIME_")
217 typedef struct _FILETIME {
218 DWORD dwLowDateTime;
219 DWORD dwHighDateTime;
220 } FILETIME, *PFILETIME, *LPFILETIME;
221 cpp_quote("#endif")
223 cpp_quote("#ifndef _TEXTMETRIC_DEFINED")
224 cpp_quote("#define _TEXTMETRIC_DEFINED")
225 typedef struct tagTEXTMETRICA
227 LONG tmHeight;
228 LONG tmAscent;
229 LONG tmDescent;
230 LONG tmInternalLeading;
231 LONG tmExternalLeading;
232 LONG tmAveCharWidth;
233 LONG tmMaxCharWidth;
234 LONG tmWeight;
235 LONG tmOverhang;
236 LONG tmDigitizedAspectX;
237 LONG tmDigitizedAspectY;
238 BYTE tmFirstChar;
239 BYTE tmLastChar;
240 BYTE tmDefaultChar;
241 BYTE tmBreakChar;
242 BYTE tmItalic;
243 BYTE tmUnderlined;
244 BYTE tmStruckOut;
245 BYTE tmPitchAndFamily;
246 BYTE tmCharSet;
247 } TEXTMETRICA, *LPTEXTMETRICA, *PTEXTMETRICA;
249 typedef struct tagTEXTMETRICW
251 LONG tmHeight;
252 LONG tmAscent;
253 LONG tmDescent;
254 LONG tmInternalLeading;
255 LONG tmExternalLeading;
256 LONG tmAveCharWidth;
257 LONG tmMaxCharWidth;
258 LONG tmWeight;
259 LONG tmOverhang;
260 LONG tmDigitizedAspectX;
261 LONG tmDigitizedAspectY;
262 WCHAR tmFirstChar;
263 WCHAR tmLastChar;
264 WCHAR tmDefaultChar;
265 WCHAR tmBreakChar;
266 BYTE tmItalic;
267 BYTE tmUnderlined;
268 BYTE tmStruckOut;
269 BYTE tmPitchAndFamily;
270 BYTE tmCharSet;
271 } TEXTMETRICW, *LPTEXTMETRICW, *PTEXTMETRICW;
272 cpp_quote("#endif")
274 /******************** BASIC COM/OLE TYPES ********************/
276 typedef WCHAR OLECHAR;
277 typedef [string] OLECHAR *LPOLESTR;
278 typedef [string] const OLECHAR *LPCOLESTR;
279 cpp_quote("#ifndef __WINESRC__")
280 cpp_quote("#define OLESTR(str) L##str")
281 cpp_quote("#endif")
283 typedef LONG SCODE;
285 typedef struct _COAUTHIDENTITY {
286 [size_is(UserLength+1)] USHORT *User;
287 ULONG UserLength;
288 [size_is(DomainLength+1)] USHORT *Domain;
289 ULONG DomainLength;
290 [size_is(PasswordLength+1)] USHORT *Password;
291 ULONG PasswordLength;
292 ULONG Flags;
293 } COAUTHIDENTITY;
295 typedef struct _COAUTHINFO {
296 DWORD dwAuthnSvc;
297 DWORD dwAuthzSvc;
298 LPWSTR pwszServerPrincName;
299 DWORD dwAuthnLevel;
300 DWORD dwImpersonationLevel;
301 COAUTHIDENTITY *pAuthIdentityData;
302 DWORD dwCapabilities;
303 } COAUTHINFO;
305 /* FIXME: COSERVERINFO was in Wine's pre-WIDL wtypes.h, but should be in objidl.idl */
306 typedef struct _COSERVERINFO {
307 DWORD dwReserved1;
308 LPWSTR pwszName;
309 COAUTHINFO *pAuthInfo;
310 DWORD dwReserved2;
311 } COSERVERINFO;
313 typedef enum tagMEMCTX {
314 MEMCTX_TASK = 1,
315 MEMCTX_SHARED = 2,
316 MEMCTX_MACSYSTEM = 3,
317 MEMCTX_UNKNOWN = -1,
318 MEMCTX_SAME = -2
319 } MEMCTX;
321 cpp_quote("#ifndef _ROTFLAGS_DEFINED")
322 cpp_quote("#define _ROTFLAGS_DEFINED")
323 cpp_quote("#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1")
324 cpp_quote("#define ROTFLAGS_ALLOWANYCLIENT 0x2")
325 cpp_quote("#endif")
327 typedef enum tagCLSCTX {
328 CLSCTX_INPROC_SERVER = 0x1,
329 CLSCTX_INPROC_HANDLER = 0x2,
330 CLSCTX_LOCAL_SERVER = 0x4,
331 CLSCTX_INPROC_SERVER16 = 0x8,
332 CLSCTX_REMOTE_SERVER = 0x10,
333 CLSCTX_INPROC_HANDLER16 = 0x20,
334 CLSCTX_INPROC_SERVERX86 = 0x40,
335 CLSCTX_INPROC_HANDLERX86 = 0x80,
336 CLSCTX_ESERVER_HANDLER = 0x100,
337 CLSCTX_NO_CODE_DOWNLOAD = 0x400,
338 CLSCTX_NO_CUSTOM_MARSHAL = 0x1000,
339 CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000,
340 CLSCTX_NO_FAILURE_LOG = 0x4000,
341 CLSCTX_DISABLE_AAA = 0x8000,
342 CLSCTX_ENABLE_AAA = 0x10000,
343 CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000
344 } CLSCTX;
346 cpp_quote("#define CLSCTX_INPROC (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER)")
347 cpp_quote("#define CLSCTX_ALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)")
348 cpp_quote("#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)")
350 typedef enum tagMSHLFLAGS {
351 MSHLFLAGS_NORMAL = 0,
352 MSHLFLAGS_TABLESTRONG = 1,
353 MSHLFLAGS_TABLEWEAK = 2,
354 MSHLFLAGS_NOPING = 4
355 } MSHLFLAGS;
357 typedef enum tagMSHCTX {
358 MSHCTX_LOCAL = 0,
359 MSHCTX_NOSHAREDMEM = 1,
360 MSHCTX_DIFFERENTMACHINE = 2,
361 MSHCTX_INPROC = 3,
362 MSHCTX_CROSSCTX = 4
363 } MSHCTX;
365 /******************** BLOB TYPES ********************/
367 typedef struct _BYTE_BLOB {
368 unsigned long clSize;
369 [size_is(clSize)] byte abData[];
370 } BYTE_BLOB;
371 typedef [unique] BYTE_BLOB *UP_BYTE_BLOB;
373 typedef struct _FLAGGED_BYTE_BLOB {
374 unsigned long fFlags;
375 unsigned long clSize;
376 [size_is(clSize)] byte abData[];
377 } FLAGGED_BYTE_BLOB;
378 typedef [unique] FLAGGED_BYTE_BLOB *UP_FLAGGED_BYTE_BLOB;
380 typedef struct _FLAGGED_WORD_BLOB {
381 unsigned long fFlags;
382 unsigned long clSize;
383 [size_is(clSize)] unsigned short asData[];
384 } FLAGGED_WORD_BLOB;
385 typedef [unique] FLAGGED_WORD_BLOB *UP_FLAGGED_WORD_BLOB;
387 typedef struct _BYTE_SIZEDARR {
388 unsigned long clSize;
389 [size_is(clSize)] byte *pData;
390 } BYTE_SIZEDARR;
392 typedef struct _SHORT_SIZEDARR {
393 unsigned long clSize;
394 [size_is(clSize)] unsigned short *pData;
395 } WORD_SIZEDARR;
397 typedef struct _LONG_SIZEDARR {
398 unsigned long clSize;
399 [size_is(clSize)] unsigned long *pData;
400 } DWORD_SIZEDARR;
402 typedef struct _HYPER_SIZEDARR {
403 unsigned long clSize;
404 [size_is(clSize)] hyper *pData;
405 } HYPER_SIZEDARR;
407 /******************** GDI TYPES ********************/
409 const unsigned long WDT_INPROC_CALL = 0x48746457;
410 const unsigned long WDT_REMOTE_CALL = 0x52746457;
412 typedef union _userCLIPFORMAT switch(long fContext) u {
413 case WDT_INPROC_CALL: DWORD dwValue;
414 case WDT_REMOTE_CALL: LPWSTR pwszName;
415 } userCLIPFORMAT;
417 typedef [unique] userCLIPFORMAT *wireCLIPFORMAT;
418 typedef [wire_marshal(wireCLIPFORMAT)] WORD CLIPFORMAT;
420 typedef struct tagRemHGLOBAL {
421 long fNullHGlobal;
422 unsigned long cbData;
423 [size_is(cbData)] byte data[];
424 } RemHGLOBAL;
426 typedef union _userHGLOBAL switch(long fContext) u {
427 case WDT_INPROC_CALL: long hInproc;
428 case WDT_REMOTE_CALL: FLAGGED_BYTE_BLOB *hRemote;
429 default: long hGlobal;
430 } userHGLOBAL;
432 typedef [unique] userHGLOBAL *wireHGLOBAL;
434 typedef struct tagRemHMETAFILEPICT {
435 long mm;
436 long xExt;
437 long yExt;
438 unsigned long cbData;
439 [size_is(cbData)] byte data[];
440 } RemHMETAFILEPICT;
442 typedef union _userHMETAFILE switch(long fContext) u {
443 case WDT_INPROC_CALL: long hInproc;
444 case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
445 default: long hGlobal;
446 } userHMETAFILE;
448 typedef [unique] userHMETAFILE *wireHMETAFILE;
450 typedef struct _remoteMETAFILEPICT {
451 long mm;
452 long xExt;
453 long yExt;
454 userHMETAFILE *hMF;
455 } remoteMETAFILEPICT;
457 typedef union _userHMETAFILEPICT switch(long fContext) u {
458 case WDT_INPROC_CALL: long hInproc;
459 case WDT_REMOTE_CALL: remoteMETAFILEPICT *hRemote;
460 default: long hGlobal;
461 } userHMETAFILEPICT;
463 typedef [unique] userHMETAFILEPICT *wireHMETAFILEPICT;
465 typedef struct tagRemHENHMETAFILE {
466 unsigned long cbData;
467 [size_is(cbData)] byte data[];
468 } RemHENHMETAFILE;
470 typedef union _userHENHMETAFILE switch(long fContext) u {
471 case WDT_INPROC_CALL: long hInproc;
472 case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
473 default: long hGlobal;
474 } userHENHMETAFILE;
476 typedef [unique] userHENHMETAFILE *wireHENHMETAFILE;
478 typedef struct tagRemHBITMAP
480 unsigned long cbData;
481 [size_is(cbData)] byte data[];
482 } RemHBITMAP;
484 typedef struct _userBITMAP {
485 LONG bmType;
486 LONG bmWidth;
487 LONG bmHeight;
488 LONG bmWidthBytes;
489 WORD bmPlanes;
490 WORD bmBitsPixel;
491 ULONG cbSize;
492 [size_is(cbSize)] byte pBuffer[];
493 } userBITMAP;
495 typedef union _userHBITMAP switch(long fContext) u {
496 case WDT_INPROC_CALL: long hInproc;
497 case WDT_REMOTE_CALL: userBITMAP *hRemote;
498 default: long hGlobal;
499 } userHBITMAP;
501 typedef [unique] userHBITMAP *wireHBITMAP;
503 typedef struct tagRemHPALETTE {
504 unsigned long cbData;
505 [size_is(cbData)] byte data[];
506 } RemHPALETTE;
508 typedef struct tagrpcLOGPALETTE {
509 WORD palVersion;
510 WORD palNumEntries;
511 [size_is(palNumEntries)] PALETTEENTRY palPalEntry[];
512 } rpcLOGPALETTE;
514 typedef union _userHPALETTE switch(long fContext) u {
515 case WDT_INPROC_CALL: long hInproc;
516 case WDT_REMOTE_CALL: rpcLOGPALETTE *hRemote;
517 default: long hGlobal;
518 } userHPALETTE;
520 typedef [unique] userHPALETTE *wireHPALETTE;
522 cpp_quote("#if 0")
523 DECLARE_WIREM_HANDLE(HGLOBAL);
524 typedef HGLOBAL HLOCAL;
525 DECLARE_WIREM_HANDLE(HBITMAP);
526 DECLARE_WIREM_HANDLE(HPALETTE);
527 DECLARE_WIREM_HANDLE(HENHMETAFILE);
528 DECLARE_WIREM_HANDLE(HMETAFILE);
529 cpp_quote("#endif")
530 DECLARE_WIREM_HANDLE(HMETAFILEPICT);
532 /******************** GUID TYPES ********************/
534 cpp_quote("#if 0") /* for IDL only (C/C++ defs are in guiddef.h) */
535 typedef GUID *REFGUID;
536 typedef IID *REFIID;
537 typedef CLSID *REFCLSID;
538 typedef FMTID *REFFMTID;
539 cpp_quote("#endif")
541 /******************** MISC TYPES ********************/
543 typedef enum tagDVASPECT {
544 DVASPECT_CONTENT = 1,
545 DVASPECT_THUMBNAIL = 2,
546 DVASPECT_ICON = 4,
547 DVASPECT_DOCPRINT = 8
548 } DVASPECT;
550 typedef enum tagSTGC {
551 STGC_DEFAULT = 0,
552 STGC_OVERWRITE = 1,
553 STGC_ONLYIFCURRENT = 2,
554 STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
555 STGC_CONSOLIDATE = 8
556 } STGC;
558 typedef enum tagSTGMOVE {
559 STGMOVE_MOVE = 0,
560 STGMOVE_COPY = 1,
561 STGMOVE_SHALLOWCOPY = 2
562 } STGMOVE;
564 typedef enum tagSTATFLAG {
565 STATFLAG_DEFAULT = 0,
566 STATFLAG_NONAME = 1,
567 STATFLAG_NOOPEN = 2
568 } STATFLAG;
570 /******************** OLE Automation ********************/
572 cpp_quote("#if 0") /* for IDL only */
573 typedef double DATE;
574 cpp_quote("#else")
575 cpp_quote("typedef double DECLSPEC_ALIGN(8) DATE;")
576 cpp_quote("#endif")
578 cpp_quote("#if 0") /* for IDL only */
579 typedef struct tagCY {
580 LONGLONG int64;
581 } CY;
582 cpp_quote("#else") /* C/C++ defs */
583 cpp_quote("#ifndef _tagCY_DEFINED")
584 cpp_quote("#define _tagCY_DEFINED")
585 cpp_quote("typedef union tagCY {")
586 cpp_quote(" struct {")
587 cpp_quote("#ifdef WORDS_BIGENDIAN")
588 cpp_quote(" LONG Hi;")
589 cpp_quote(" ULONG Lo;")
590 cpp_quote("#else")
591 cpp_quote(" ULONG Lo;")
592 cpp_quote(" LONG Hi;")
593 cpp_quote("#endif")
594 cpp_quote(" } DUMMYSTRUCTNAME;")
595 cpp_quote(" LONGLONG int64;")
596 cpp_quote("} CY;")
597 cpp_quote("#endif")
598 cpp_quote("#endif")
600 typedef CY *LPCY;
602 cpp_quote("#if 0") /* for IDL only */
603 typedef struct tagDEC {
604 USHORT wReserved;
605 BYTE scale;
606 BYTE sign;
607 ULONG Hi32;
608 ULONGLONG Lo64;
609 } DECIMAL;
610 cpp_quote("#else") /* C/C++ defs */
611 cpp_quote("typedef struct tagDEC {")
612 cpp_quote(" USHORT wReserved;")
613 cpp_quote(" union {")
614 cpp_quote(" struct {")
615 cpp_quote(" BYTE scale;")
616 cpp_quote(" BYTE sign;")
617 cpp_quote(" } DUMMYSTRUCTNAME;")
618 cpp_quote(" USHORT signscale;")
619 cpp_quote(" } DUMMYUNIONNAME;")
620 cpp_quote(" ULONG Hi32;")
621 cpp_quote(" union {")
622 cpp_quote(" struct {")
623 cpp_quote("#ifdef WORDS_BIGENDIAN")
624 cpp_quote(" ULONG Mid32;")
625 cpp_quote(" ULONG Lo32;")
626 cpp_quote("#else")
627 cpp_quote(" ULONG Lo32;")
628 cpp_quote(" ULONG Mid32;")
629 cpp_quote("#endif")
630 cpp_quote(" } DUMMYSTRUCTNAME1;")
631 cpp_quote(" ULONGLONG Lo64;")
632 cpp_quote(" } DUMMYUNIONNAME1;")
633 cpp_quote("} DECIMAL;")
634 cpp_quote("#endif")
635 cpp_quote("#define DECIMAL_NEG ((BYTE)0x80)")
636 cpp_quote("#define DECIMAL_SETZERO(d) do{ memset(((char*)&(d)) + sizeof(USHORT), 0, sizeof(ULONG) * 3u + sizeof(USHORT)); }while (0)")
638 typedef DECIMAL *LPDECIMAL;
640 typedef [unique] FLAGGED_WORD_BLOB *wireBSTR;
641 typedef [wire_marshal(wireBSTR)] OLECHAR *BSTR;
642 typedef BSTR *LPBSTR;
644 typedef short VARIANT_BOOL;
645 typedef VARIANT_BOOL _VARIANT_BOOL;
646 cpp_quote("#define VARIANT_TRUE ((VARIANT_BOOL)0xFFFF)")
647 cpp_quote("#define VARIANT_FALSE ((VARIANT_BOOL)0x0000)")
649 typedef struct tagBSTRBLOB {
650 ULONG cbSize;
651 [size_is(cbSize)] BYTE *pData;
652 } BSTRBLOB, *LPBSTRBLOB;
654 cpp_quote("#ifndef _tagBLOB_DEFINED")
655 cpp_quote("#define _tagBLOB_DEFINED")
656 cpp_quote("#define _BLOB_DEFINED")
657 cpp_quote("#define _LPBLOB_DEFINED")
658 typedef struct tagBLOB {
659 ULONG cbSize;
660 [size_is(cbSize)] BYTE *pBlobData;
661 } BLOB, *LPBLOB;
662 cpp_quote("#endif")
664 typedef struct tagCLIPDATA {
665 ULONG cbSize;
666 long ulClipFmt;
667 [size_is(cbSize-sizeof(long))] BYTE *pClipData;
668 } CLIPDATA;
669 cpp_quote("#define CBPCLIPDATA(cb) ((cb).cbSize - sizeof((cb).ulClipFmt))")
671 typedef ULONG PROPID;
673 /******************** VARTYPE ********************/
675 typedef unsigned short VARTYPE;
676 enum VARENUM {
677 VT_EMPTY = 0,
678 VT_NULL = 1,
679 VT_I2 = 2,
680 VT_I4 = 3,
681 VT_R4 = 4,
682 VT_R8 = 5,
683 VT_CY = 6,
684 VT_DATE = 7,
685 VT_BSTR = 8,
686 VT_DISPATCH = 9,
687 VT_ERROR = 10,
688 VT_BOOL = 11,
689 VT_VARIANT = 12,
690 VT_UNKNOWN = 13,
691 VT_DECIMAL = 14,
692 VT_I1 = 16,
693 VT_UI1 = 17,
694 VT_UI2 = 18,
695 VT_UI4 = 19,
696 VT_I8 = 20,
697 VT_UI8 = 21,
698 VT_INT = 22,
699 VT_UINT = 23,
700 VT_VOID = 24,
701 VT_HRESULT = 25,
702 VT_PTR = 26,
703 VT_SAFEARRAY = 27,
704 VT_CARRAY = 28,
705 VT_USERDEFINED = 29,
706 VT_LPSTR = 30,
707 VT_LPWSTR = 31,
708 VT_RECORD = 36,
709 VT_INT_PTR = 37,
710 VT_UINT_PTR = 38,
711 VT_FILETIME = 64,
712 VT_BLOB = 65,
713 VT_STREAM = 66,
714 VT_STORAGE = 67,
715 VT_STREAMED_OBJECT = 68,
716 VT_STORED_OBJECT = 69,
717 VT_BLOB_OBJECT = 70,
718 VT_CF = 71,
719 VT_CLSID = 72,
720 VT_BSTR_BLOB = 0x0fff,
721 VT_VECTOR = 0x1000,
722 VT_ARRAY = 0x2000,
723 VT_BYREF = 0x4000,
724 VT_RESERVED = 0x8000,
725 VT_ILLEGAL = 0xffff,
726 VT_ILLEGALMASKED = 0x0fff,
727 VT_TYPEMASK = 0x0fff
730 typedef struct tagCSPLATFORM
732 DWORD dwPlatformId;
733 DWORD dwVersionHi;
734 DWORD dwVersionLo;
735 DWORD dwProcessorArch;
736 } CSPLATFORM;
738 typedef struct tagQUERYCONTEXT
740 DWORD dwContext;
741 CSPLATFORM Platform;
742 LCID Locale;
743 DWORD dwVersionHi;
744 DWORD dwVersionLo;
745 } QUERYCONTEXT;
747 typedef [v1_enum] enum tagTYSPEC
749 TYSPEC_CLSID,
750 TYSPEC_FILEEXT,
751 TYSPEC_MIMETYPE,
752 TYSPEC_PROGID,
753 TYSPEC_FILENAME,
754 TYSPEC_PACKAGENAME,
755 TYSPEC_OBJECTID
756 } TYSPEC;
758 typedef union switch(DWORD tyspec)
760 case TYSPEC_CLSID:
761 CLSID clsid;
762 case TYSPEC_FILEEXT:
763 LPOLESTR pFileExt;
764 case TYSPEC_MIMETYPE:
765 LPOLESTR pMimeType;
766 case TYSPEC_PROGID:
767 LPOLESTR pProgId;
768 case TYSPEC_FILENAME:
769 LPOLESTR pFileName;
770 case TYSPEC_PACKAGENAME:
771 struct
773 LPOLESTR pPackageName;
774 GUID PolicyId;
775 } ByName;
776 case TYSPEC_OBJECTID:
777 struct
779 GUID ObjectId;
780 GUID PolicyId;
781 } ByObjectId;
782 } uCLSSPEC;
784 } /* interface IWinTypes */