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