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