dmime/tests: Test wave segments and DMUS_WAVE_PMSG.
[wine.git] / include / wtypes.idl
blob0db3a397d41efcbe4b8f664b014f36d08f37e47e
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 byte 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;
90 typedef USHORT LANGID;
92 typedef unsigned __int64 DWORDLONG;
93 typedef __int64 LONGLONG;
94 typedef unsigned __int64 ULONGLONG;
96 typedef struct _LARGE_INTEGER {
97 LONGLONG QuadPart;
98 } LARGE_INTEGER;
100 typedef struct _ULARGE_INTEGER {
101 ULONGLONG QuadPart;
102 } ULARGE_INTEGER;
104 typedef struct _SID_IDENTIFIER_AUTHORITY {
105 UCHAR Value[6];
106 } SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
108 typedef struct _SID {
109 UCHAR Revision;
110 UCHAR SubAuthorityCount;
111 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
112 [size_is(SubAuthorityCount)] ULONG SubAuthority[*];
113 } SID, *PSID;
115 typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
117 typedef struct _ACL {
118 UCHAR AclRevision;
119 UCHAR Sbz1;
120 USHORT AclSize;
121 USHORT AceCount;
122 USHORT Sbz2;
123 } ACL;
124 typedef ACL *PACL;
126 typedef struct _SECURITY_DESCRIPTOR {
127 UCHAR Revision;
128 UCHAR Sbz1;
129 SECURITY_DESCRIPTOR_CONTROL Control;
130 PSID Owner;
131 PSID Group;
132 PACL Sacl;
133 PACL Dacl;
134 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
136 typedef struct _SECURITY_ATTRIBUTES
138 DWORD nLength;
139 [size_is(nLength)] LPVOID lpSecurityDescriptor;
140 BOOL bInheritHandle;
141 } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
143 typedef struct tagSIZE
145 LONG cx;
146 LONG cy;
147 } SIZE, *PSIZE, *LPSIZE;
148 typedef SIZE SIZEL, *PSIZEL, *LPSIZEL;
150 typedef struct tagPOINT
152 LONG x;
153 LONG y;
154 } POINT, *PPOINT, *LPPOINT;
156 typedef struct _POINTL
158 LONG x;
159 LONG y;
160 } POINTL, *PPOINTL;
162 typedef struct tagRECT
164 LONG left;
165 LONG top;
166 LONG right;
167 LONG bottom;
168 } RECT, *PRECT, *LPRECT;
169 typedef const RECT *LPCRECT;
171 typedef struct _RECTL
173 LONG left;
174 LONG top;
175 LONG right;
176 LONG bottom;
177 } RECTL, *PRECTL, *LPRECTL;
178 typedef const RECTL *LPCRECTL;
180 typedef UINT_PTR WPARAM;
181 typedef LONG_PTR LPARAM;
183 cpp_quote("#endif /* winnt.h */")
185 cpp_quote("#ifdef _MSC_VER") /* for IDL and MSVC only */
186 typedef double DOUBLE;
187 cpp_quote("#else")
188 cpp_quote("typedef double DECLSPEC_ALIGN(8) DOUBLE;")
189 cpp_quote("#endif")
191 cpp_quote("#ifndef _PALETTEENTRY_DEFINED")
192 cpp_quote("#define _PALETTEENTRY_DEFINED")
193 typedef struct tagPALETTEENTRY {
194 BYTE peRed;
195 BYTE peGreen;
196 BYTE peBlue;
197 BYTE peFlags;
198 } PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
199 cpp_quote("#endif")
201 cpp_quote("#ifndef _LOGPALETTE_DEFINED")
202 cpp_quote("#define _LOGPALETTE_DEFINED")
203 typedef struct tagLOGPALETTE
205 WORD palVersion;
206 WORD palNumEntries;
207 [size_is(palNumEntries)] PALETTEENTRY palPalEntry[*];
208 } LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
209 cpp_quote("#endif")
211 cpp_quote("#ifndef _SYSTEMTIME_")
212 cpp_quote("#define _SYSTEMTIME_")
213 typedef struct _SYSTEMTIME{
214 WORD wYear;
215 WORD wMonth;
216 WORD wDayOfWeek;
217 WORD wDay;
218 WORD wHour;
219 WORD wMinute;
220 WORD wSecond;
221 WORD wMilliseconds;
222 } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
223 cpp_quote("#endif")
225 cpp_quote("#ifndef _FILETIME_")
226 cpp_quote("#define _FILETIME_")
227 typedef struct _FILETIME {
228 DWORD dwLowDateTime;
229 DWORD dwHighDateTime;
230 } FILETIME, *PFILETIME, *LPFILETIME;
231 cpp_quote("#endif")
233 cpp_quote("#ifndef _TEXTMETRIC_DEFINED")
234 cpp_quote("#define _TEXTMETRIC_DEFINED")
235 typedef struct tagTEXTMETRICA
237 LONG tmHeight;
238 LONG tmAscent;
239 LONG tmDescent;
240 LONG tmInternalLeading;
241 LONG tmExternalLeading;
242 LONG tmAveCharWidth;
243 LONG tmMaxCharWidth;
244 LONG tmWeight;
245 LONG tmOverhang;
246 LONG tmDigitizedAspectX;
247 LONG tmDigitizedAspectY;
248 BYTE tmFirstChar;
249 BYTE tmLastChar;
250 BYTE tmDefaultChar;
251 BYTE tmBreakChar;
252 BYTE tmItalic;
253 BYTE tmUnderlined;
254 BYTE tmStruckOut;
255 BYTE tmPitchAndFamily;
256 BYTE tmCharSet;
257 } TEXTMETRICA, *LPTEXTMETRICA, *PTEXTMETRICA;
259 typedef struct tagTEXTMETRICW
261 LONG tmHeight;
262 LONG tmAscent;
263 LONG tmDescent;
264 LONG tmInternalLeading;
265 LONG tmExternalLeading;
266 LONG tmAveCharWidth;
267 LONG tmMaxCharWidth;
268 LONG tmWeight;
269 LONG tmOverhang;
270 LONG tmDigitizedAspectX;
271 LONG tmDigitizedAspectY;
272 WCHAR tmFirstChar;
273 WCHAR tmLastChar;
274 WCHAR tmDefaultChar;
275 WCHAR tmBreakChar;
276 BYTE tmItalic;
277 BYTE tmUnderlined;
278 BYTE tmStruckOut;
279 BYTE tmPitchAndFamily;
280 BYTE tmCharSet;
281 } TEXTMETRICW, *LPTEXTMETRICW, *PTEXTMETRICW;
282 cpp_quote("#endif")
284 /******************** BASIC COM/OLE TYPES ********************/
286 typedef WCHAR OLECHAR;
287 typedef [string] OLECHAR *LPOLESTR;
288 typedef [string] const OLECHAR *LPCOLESTR;
289 cpp_quote("#ifndef __WINESRC__")
290 cpp_quote("# ifdef WINE_UNICODE_NATIVE")
291 cpp_quote("# define OLESTR(str) L##str")
292 cpp_quote("# else")
293 cpp_quote("# define OLESTR(str) u##str")
294 cpp_quote("# endif")
295 cpp_quote("#endif")
297 typedef LONG SCODE;
299 typedef struct _COAUTHIDENTITY {
300 [size_is(UserLength+1)] USHORT *User;
301 ULONG UserLength;
302 [size_is(DomainLength+1)] USHORT *Domain;
303 ULONG DomainLength;
304 [size_is(PasswordLength+1)] USHORT *Password;
305 ULONG PasswordLength;
306 ULONG Flags;
307 } COAUTHIDENTITY;
309 typedef struct _COAUTHINFO {
310 DWORD dwAuthnSvc;
311 DWORD dwAuthzSvc;
312 LPWSTR pwszServerPrincName;
313 DWORD dwAuthnLevel;
314 DWORD dwImpersonationLevel;
315 COAUTHIDENTITY *pAuthIdentityData;
316 DWORD dwCapabilities;
317 } COAUTHINFO;
319 typedef enum tagMEMCTX {
320 MEMCTX_TASK = 1,
321 MEMCTX_SHARED = 2,
322 MEMCTX_MACSYSTEM = 3,
323 MEMCTX_UNKNOWN = -1,
324 MEMCTX_SAME = -2
325 } MEMCTX;
327 cpp_quote("#ifndef _ROT_COMPARE_MAX_DEFINED")
328 cpp_quote("#define _ROT_COMPARE_MAX_DEFINED")
329 cpp_quote("#define ROT_COMPARE_MAX 2048")
330 cpp_quote("#endif")
332 cpp_quote("#ifndef _ROTFLAGS_DEFINED")
333 cpp_quote("#define _ROTFLAGS_DEFINED")
334 cpp_quote("#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1")
335 cpp_quote("#define ROTFLAGS_ALLOWANYCLIENT 0x2")
336 cpp_quote("#endif")
338 typedef enum tagCLSCTX {
339 CLSCTX_INPROC_SERVER = 0x00000001,
340 CLSCTX_INPROC_HANDLER = 0x00000002,
341 CLSCTX_LOCAL_SERVER = 0x00000004,
342 CLSCTX_INPROC_SERVER16 = 0x00000008,
343 CLSCTX_REMOTE_SERVER = 0x00000010,
344 CLSCTX_INPROC_HANDLER16 = 0x00000020,
345 CLSCTX_INPROC_SERVERX86 = 0x00000040,
346 CLSCTX_INPROC_HANDLERX86 = 0x00000080,
347 CLSCTX_ESERVER_HANDLER = 0x00000100,
348 CLSCTX_NO_CODE_DOWNLOAD = 0x00000400,
349 CLSCTX_NO_CUSTOM_MARSHAL = 0x00001000,
350 CLSCTX_ENABLE_CODE_DOWNLOAD = 0x00002000,
351 CLSCTX_NO_FAILURE_LOG = 0x00004000,
352 CLSCTX_DISABLE_AAA = 0x00008000,
353 CLSCTX_ENABLE_AAA = 0x00010000,
354 CLSCTX_FROM_DEFAULT_CONTEXT = 0x00020000,
355 CLSCTX_ACTIVATE_X86_SERVER = 0x00040000,
356 CLSCTX_ACTIVATE_32_BIT_SERVER = CLSCTX_ACTIVATE_X86_SERVER,
357 CLSCTX_ACTIVATE_64_BIT_SERVER = 0x00080000,
358 CLSCTX_ENABLE_CLOAKING = 0x00100000,
359 CLSCTX_APPCONTAINER = 0x00400000,
360 CLSCTX_ACTIVATE_AAA_AS_IU = 0x00800000,
361 CLSCTX_RESERVED6 = 0x01000000,
362 CLSCTX_ACTIVATE_ARM32_SERVER = 0x02000000,
363 CLSCTX_PS_DLL = 0x80000000,
364 } CLSCTX;
366 cpp_quote("#define CLSCTX_INPROC (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER)")
367 cpp_quote("#define CLSCTX_ALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)")
368 cpp_quote("#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)")
370 typedef enum tagMSHLFLAGS {
371 MSHLFLAGS_NORMAL = 0,
372 MSHLFLAGS_TABLESTRONG = 1,
373 MSHLFLAGS_TABLEWEAK = 2,
374 MSHLFLAGS_NOPING = 4
375 } MSHLFLAGS;
377 typedef enum tagMSHCTX {
378 MSHCTX_LOCAL = 0,
379 MSHCTX_NOSHAREDMEM = 1,
380 MSHCTX_DIFFERENTMACHINE = 2,
381 MSHCTX_INPROC = 3,
382 MSHCTX_CROSSCTX = 4
383 } MSHCTX;
385 /******************** BLOB TYPES ********************/
387 typedef struct _BYTE_BLOB {
388 unsigned long clSize;
389 [size_is(clSize)] byte abData[];
390 } BYTE_BLOB;
391 typedef [unique] BYTE_BLOB *UP_BYTE_BLOB;
393 typedef struct _FLAGGED_BYTE_BLOB {
394 unsigned long fFlags;
395 unsigned long clSize;
396 [size_is(clSize)] byte abData[];
397 } FLAGGED_BYTE_BLOB;
398 typedef [unique] FLAGGED_BYTE_BLOB *UP_FLAGGED_BYTE_BLOB;
400 typedef struct _FLAGGED_WORD_BLOB {
401 unsigned long fFlags;
402 unsigned long clSize;
403 [size_is(clSize)] unsigned short asData[];
404 } FLAGGED_WORD_BLOB;
405 typedef [unique] FLAGGED_WORD_BLOB *UP_FLAGGED_WORD_BLOB;
407 typedef struct _BYTE_SIZEDARR {
408 unsigned long clSize;
409 [size_is(clSize)] byte *pData;
410 } BYTE_SIZEDARR;
412 typedef struct _SHORT_SIZEDARR {
413 unsigned long clSize;
414 [size_is(clSize)] unsigned short *pData;
415 } WORD_SIZEDARR;
417 typedef struct _LONG_SIZEDARR {
418 unsigned long clSize;
419 [size_is(clSize)] unsigned long *pData;
420 } DWORD_SIZEDARR;
422 typedef struct _HYPER_SIZEDARR {
423 unsigned long clSize;
424 [size_is(clSize)] hyper *pData;
425 } HYPER_SIZEDARR;
427 /******************** GDI TYPES ********************/
429 const unsigned long WDT_INPROC_CALL = 0x48746457;
430 const unsigned long WDT_REMOTE_CALL = 0x52746457;
431 const unsigned long WDT_INPROC64_CALL = 0x50746457;
433 typedef union _userCLIPFORMAT switch(long fContext) u {
434 case WDT_INPROC_CALL: DWORD dwValue;
435 case WDT_REMOTE_CALL: LPWSTR pwszName;
436 } userCLIPFORMAT;
438 typedef [unique] userCLIPFORMAT *wireCLIPFORMAT;
439 typedef [wire_marshal(wireCLIPFORMAT)] WORD CLIPFORMAT;
441 typedef struct tagRemHGLOBAL {
442 long fNullHGlobal;
443 unsigned long cbData;
444 [size_is(cbData)] byte data[];
445 } RemHGLOBAL;
447 typedef union _userHGLOBAL switch(long fContext) u {
448 case WDT_INPROC_CALL: long hInproc;
449 case WDT_REMOTE_CALL: FLAGGED_BYTE_BLOB *hRemote;
450 case WDT_INPROC64_CALL: __int64 hInproc64;
451 } userHGLOBAL;
453 typedef [unique] userHGLOBAL *wireHGLOBAL;
455 typedef struct tagRemHMETAFILEPICT {
456 long mm;
457 long xExt;
458 long yExt;
459 unsigned long cbData;
460 [size_is(cbData)] byte data[];
461 } RemHMETAFILEPICT;
463 typedef union _userHMETAFILE switch(long fContext) u {
464 case WDT_INPROC_CALL: long hInproc;
465 case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
466 case WDT_INPROC64_CALL: __int64 hInproc64;
467 } userHMETAFILE;
469 typedef [unique] userHMETAFILE *wireHMETAFILE;
471 typedef struct _remoteMETAFILEPICT {
472 long mm;
473 long xExt;
474 long yExt;
475 userHMETAFILE *hMF;
476 } remoteMETAFILEPICT;
478 typedef union _userHMETAFILEPICT switch(long fContext) u {
479 case WDT_INPROC_CALL: long hInproc;
480 case WDT_REMOTE_CALL: remoteMETAFILEPICT *hRemote;
481 case WDT_INPROC64_CALL: __int64 hInproc64;
482 } userHMETAFILEPICT;
484 typedef [unique] userHMETAFILEPICT *wireHMETAFILEPICT;
486 typedef struct tagRemHENHMETAFILE {
487 unsigned long cbData;
488 [size_is(cbData)] byte data[];
489 } RemHENHMETAFILE;
491 typedef union _userHENHMETAFILE switch(long fContext) u {
492 case WDT_INPROC_CALL: long hInproc;
493 case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
494 case WDT_INPROC64_CALL: __int64 hInproc64;
495 } userHENHMETAFILE;
497 typedef [unique] userHENHMETAFILE *wireHENHMETAFILE;
499 typedef struct tagRemHBITMAP
501 unsigned long cbData;
502 [size_is(cbData)] byte data[];
503 } RemHBITMAP;
505 typedef struct _userBITMAP {
506 LONG bmType;
507 LONG bmWidth;
508 LONG bmHeight;
509 LONG bmWidthBytes;
510 WORD bmPlanes;
511 WORD bmBitsPixel;
512 ULONG cbSize;
513 [size_is(cbSize)] byte pBuffer[];
514 } userBITMAP;
516 typedef union _userHBITMAP switch(long fContext) u {
517 case WDT_INPROC_CALL: long hInproc;
518 case WDT_REMOTE_CALL: userBITMAP *hRemote;
519 case WDT_INPROC64_CALL: __int64 hInproc64;
520 } userHBITMAP;
522 typedef [unique] userHBITMAP *wireHBITMAP;
524 typedef struct tagRemHPALETTE {
525 unsigned long cbData;
526 [size_is(cbData)] byte data[];
527 } RemHPALETTE;
529 typedef struct tagrpcLOGPALETTE {
530 WORD palVersion;
531 WORD palNumEntries;
532 [size_is(palNumEntries)] PALETTEENTRY palPalEntry[];
533 } rpcLOGPALETTE;
535 typedef union _userHPALETTE switch(long fContext) u {
536 case WDT_INPROC_CALL: long hInproc;
537 case WDT_REMOTE_CALL: rpcLOGPALETTE *hRemote;
538 case WDT_INPROC64_CALL: __int64 hInproc64;
539 } userHPALETTE;
541 typedef [unique] userHPALETTE *wireHPALETTE;
543 cpp_quote("#if 0")
544 DECLARE_WIREM_HANDLE(HGLOBAL);
545 typedef HGLOBAL HLOCAL;
546 DECLARE_WIREM_HANDLE(HBITMAP);
547 DECLARE_WIREM_HANDLE(HPALETTE);
548 DECLARE_WIREM_HANDLE(HENHMETAFILE);
549 DECLARE_WIREM_HANDLE(HMETAFILE);
550 cpp_quote("#endif")
551 DECLARE_WIREM_HANDLE(HMETAFILEPICT);
553 typedef union _RemotableHandle switch (long fContext) u
555 case WDT_INPROC_CALL: long hInproc;
556 case WDT_REMOTE_CALL: long hRemote;
557 } RemotableHandle;
559 typedef [unique] RemotableHandle *wireHACCEL;
560 typedef [unique] RemotableHandle *wireHBRUSH;
561 typedef [unique] RemotableHandle *wireHDC;
562 typedef [unique] RemotableHandle *wireHFONT;
563 typedef [unique] RemotableHandle *wireHICON;
564 typedef [unique] RemotableHandle *wireHMENU;
565 typedef [unique] RemotableHandle *wireHWND;
566 typedef [unique] RemotableHandle *wireHMONITOR;
568 cpp_quote("#if 0") /* for IDL only (C/C++ defs are in windef.h) */
569 DECLARE_WIREM_HANDLE(HACCEL);
570 DECLARE_WIREM_HANDLE(HBRUSH);
571 DECLARE_WIREM_HANDLE(HDC);
572 DECLARE_WIREM_HANDLE(HFONT);
573 DECLARE_WIREM_HANDLE(HICON);
574 DECLARE_WIREM_HANDLE(HMENU);
575 DECLARE_WIREM_HANDLE(HWND);
576 DECLARE_WIREM_HANDLE(HMONITOR);
578 typedef HICON HCURSOR;
580 typedef struct tagMSG
582 HWND hwnd;
583 UINT message;
584 WPARAM wParam;
585 LPARAM lParam;
586 DWORD time;
587 POINT pt;
588 } MSG, *PMSG, *NPMSG, *LPMSG;
590 cpp_quote("#endif")
592 /******************** GUID TYPES ********************/
594 cpp_quote("#if 0") /* for IDL only (C/C++ defs are in guiddef.h) */
595 typedef GUID *REFGUID;
596 typedef IID *REFIID;
597 typedef CLSID *REFCLSID;
598 typedef FMTID *REFFMTID;
599 cpp_quote("#endif")
601 /******************** MISC TYPES ********************/
603 typedef enum tagDVASPECT {
604 DVASPECT_CONTENT = 1,
605 DVASPECT_THUMBNAIL = 2,
606 DVASPECT_ICON = 4,
607 DVASPECT_DOCPRINT = 8
608 } DVASPECT;
610 typedef enum tagSTGC {
611 STGC_DEFAULT = 0,
612 STGC_OVERWRITE = 1,
613 STGC_ONLYIFCURRENT = 2,
614 STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
615 STGC_CONSOLIDATE = 8
616 } STGC;
618 typedef enum tagSTGMOVE {
619 STGMOVE_MOVE = 0,
620 STGMOVE_COPY = 1,
621 STGMOVE_SHALLOWCOPY = 2
622 } STGMOVE;
624 typedef enum tagSTATFLAG {
625 STATFLAG_DEFAULT = 0,
626 STATFLAG_NONAME = 1,
627 STATFLAG_NOOPEN = 2
628 } STATFLAG;
630 /******************** OLE Automation ********************/
632 cpp_quote("#ifdef _MSC_VER") /* for IDL and MSVC only */
633 typedef double DATE;
634 cpp_quote("#else")
635 cpp_quote("typedef double DECLSPEC_ALIGN(8) DATE;")
636 cpp_quote("#endif")
638 cpp_quote("#if 0") /* for IDL only */
639 typedef struct tagCY {
640 LONGLONG int64;
641 } CY;
642 cpp_quote("#else") /* C/C++ defs */
643 cpp_quote("#ifndef _tagCY_DEFINED")
644 cpp_quote("#define _tagCY_DEFINED")
645 cpp_quote("typedef union tagCY {")
646 cpp_quote(" struct {")
647 cpp_quote("#ifdef WORDS_BIGENDIAN")
648 cpp_quote(" LONG Hi;")
649 cpp_quote(" ULONG Lo;")
650 cpp_quote("#else")
651 cpp_quote(" ULONG Lo;")
652 cpp_quote(" LONG Hi;")
653 cpp_quote("#endif")
654 cpp_quote(" } DUMMYSTRUCTNAME;")
655 cpp_quote(" LONGLONG int64;")
656 cpp_quote("} CY;")
657 cpp_quote("#endif")
658 cpp_quote("#endif")
660 typedef CY *LPCY;
662 cpp_quote("#if 0") /* for IDL only */
663 typedef struct tagDEC {
664 USHORT wReserved;
665 BYTE scale;
666 BYTE sign;
667 ULONG Hi32;
668 ULONGLONG Lo64;
669 } DECIMAL;
670 cpp_quote("#else") /* C/C++ defs */
671 cpp_quote("typedef struct tagDEC {")
672 cpp_quote(" USHORT wReserved;")
673 cpp_quote(" union {")
674 cpp_quote(" struct {")
675 cpp_quote(" BYTE scale;")
676 cpp_quote(" BYTE sign;")
677 cpp_quote(" } DUMMYSTRUCTNAME;")
678 cpp_quote(" USHORT signscale;")
679 cpp_quote(" } DUMMYUNIONNAME;")
680 cpp_quote(" ULONG Hi32;")
681 cpp_quote(" union {")
682 cpp_quote(" struct {")
683 cpp_quote("#ifdef WORDS_BIGENDIAN")
684 cpp_quote(" ULONG Mid32;")
685 cpp_quote(" ULONG Lo32;")
686 cpp_quote("#else")
687 cpp_quote(" ULONG Lo32;")
688 cpp_quote(" ULONG Mid32;")
689 cpp_quote("#endif")
690 cpp_quote(" } DUMMYSTRUCTNAME1;")
691 cpp_quote(" ULONGLONG Lo64;")
692 cpp_quote(" } DUMMYUNIONNAME1;")
693 cpp_quote("} DECIMAL;")
694 cpp_quote("#endif")
695 cpp_quote("#define DECIMAL_NEG ((BYTE)0x80)")
696 cpp_quote("#define DECIMAL_SETZERO(d) do{ memset(((char*)&(d)) + sizeof(USHORT), 0, sizeof(ULONG) * 3u + sizeof(USHORT)); }while (0)")
698 typedef DECIMAL *LPDECIMAL;
700 typedef [unique] FLAGGED_WORD_BLOB *wireBSTR;
701 typedef [wire_marshal(wireBSTR)] OLECHAR *BSTR;
702 typedef BSTR *LPBSTR;
704 typedef short VARIANT_BOOL;
705 typedef VARIANT_BOOL _VARIANT_BOOL;
706 cpp_quote("#define VARIANT_TRUE ((VARIANT_BOOL)0xFFFF)")
707 cpp_quote("#define VARIANT_FALSE ((VARIANT_BOOL)0x0000)")
709 typedef struct tagBSTRBLOB {
710 ULONG cbSize;
711 [size_is(cbSize)] BYTE *pData;
712 } BSTRBLOB, *LPBSTRBLOB;
714 cpp_quote("#ifndef _tagBLOB_DEFINED")
715 cpp_quote("#define _tagBLOB_DEFINED")
716 cpp_quote("#define _BLOB_DEFINED")
717 cpp_quote("#define _LPBLOB_DEFINED")
718 typedef struct tagBLOB {
719 ULONG cbSize;
720 [size_is(cbSize)] BYTE *pBlobData;
721 } BLOB, *LPBLOB;
722 cpp_quote("#endif")
724 typedef struct tagCLIPDATA {
725 ULONG cbSize;
726 long ulClipFmt;
727 [size_is(cbSize-sizeof(long))] BYTE *pClipData;
728 } CLIPDATA;
729 cpp_quote("#define CBPCLIPDATA(cb) ((cb).cbSize - sizeof((cb).ulClipFmt))")
731 typedef ULONG PROPID;
733 /******************** VARTYPE ********************/
735 typedef unsigned short VARTYPE;
736 enum VARENUM {
737 VT_EMPTY = 0,
738 VT_NULL = 1,
739 VT_I2 = 2,
740 VT_I4 = 3,
741 VT_R4 = 4,
742 VT_R8 = 5,
743 VT_CY = 6,
744 VT_DATE = 7,
745 VT_BSTR = 8,
746 VT_DISPATCH = 9,
747 VT_ERROR = 10,
748 VT_BOOL = 11,
749 VT_VARIANT = 12,
750 VT_UNKNOWN = 13,
751 VT_DECIMAL = 14,
752 VT_I1 = 16,
753 VT_UI1 = 17,
754 VT_UI2 = 18,
755 VT_UI4 = 19,
756 VT_I8 = 20,
757 VT_UI8 = 21,
758 VT_INT = 22,
759 VT_UINT = 23,
760 VT_VOID = 24,
761 VT_HRESULT = 25,
762 VT_PTR = 26,
763 VT_SAFEARRAY = 27,
764 VT_CARRAY = 28,
765 VT_USERDEFINED = 29,
766 VT_LPSTR = 30,
767 VT_LPWSTR = 31,
768 VT_RECORD = 36,
769 VT_INT_PTR = 37,
770 VT_UINT_PTR = 38,
771 VT_FILETIME = 64,
772 VT_BLOB = 65,
773 VT_STREAM = 66,
774 VT_STORAGE = 67,
775 VT_STREAMED_OBJECT = 68,
776 VT_STORED_OBJECT = 69,
777 VT_BLOB_OBJECT = 70,
778 VT_CF = 71,
779 VT_CLSID = 72,
780 VT_VERSIONED_STREAM= 73,
781 VT_BSTR_BLOB = 0x0fff,
782 VT_VECTOR = 0x1000,
783 VT_ARRAY = 0x2000,
784 VT_BYREF = 0x4000,
785 VT_RESERVED = 0x8000,
786 VT_ILLEGAL = 0xffff,
787 VT_ILLEGALMASKED = 0x0fff,
788 VT_TYPEMASK = 0x0fff
791 typedef struct tagCSPLATFORM
793 DWORD dwPlatformId;
794 DWORD dwVersionHi;
795 DWORD dwVersionLo;
796 DWORD dwProcessorArch;
797 } CSPLATFORM;
799 typedef struct tagQUERYCONTEXT
801 DWORD dwContext;
802 CSPLATFORM Platform;
803 LCID Locale;
804 DWORD dwVersionHi;
805 DWORD dwVersionLo;
806 } QUERYCONTEXT;
808 typedef [v1_enum] enum tagTYSPEC
810 TYSPEC_CLSID,
811 TYSPEC_FILEEXT,
812 TYSPEC_MIMETYPE,
813 TYSPEC_PROGID,
814 TYSPEC_FILENAME,
815 TYSPEC_PACKAGENAME,
816 TYSPEC_OBJECTID
817 } TYSPEC;
819 typedef union switch(DWORD tyspec)
821 case TYSPEC_CLSID:
822 CLSID clsid;
823 case TYSPEC_FILEEXT:
824 LPOLESTR pFileExt;
825 case TYSPEC_MIMETYPE:
826 LPOLESTR pMimeType;
827 case TYSPEC_PROGID:
828 LPOLESTR pProgId;
829 case TYSPEC_FILENAME:
830 LPOLESTR pFileName;
831 case TYSPEC_PACKAGENAME:
832 struct
834 LPOLESTR pPackageName;
835 GUID PolicyId;
836 } ByName;
837 case TYSPEC_OBJECTID:
838 struct
840 GUID ObjectId;
841 GUID PolicyId;
842 } ByObjectId;
843 } uCLSSPEC;
845 cpp_quote("#ifndef PROPERTYKEY_DEFINED")
846 cpp_quote("#define PROPERTYKEY_DEFINED")
847 typedef struct _tagpropertykey
849 GUID fmtid;
850 DWORD pid;
851 } PROPERTYKEY;
852 cpp_quote("#endif /*PROPERTYKEY_DEFINED*/")
854 } /* interface IWinTypes */