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
22 uuid(D3980A60-910C-1068-9341-00DD010F2F1C),
24 pointer_default(unique)
29 /******************** WINE STUFF ********************/
31 cpp_quote("#include \"basetsd.h\"")
32 cpp_quote("#include \"guiddef.h\"")
34 /******************** BASIC WIN32 TYPES ********************/
35 cpp_quote("#if 0 /* winnt.h */") /* don't redefine these */
37 typedef unsigned char BYTE;
38 typedef unsigned short WORD;
39 typedef unsigned long DWORD;
41 typedef unsigned char UCHAR;
43 typedef unsigned int UINT;
45 typedef unsigned short USHORT;
47 typedef unsigned long ULONG;
49 typedef double DOUBLE;
51 typedef void *PVOID, *LPVOID;
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;
64 #define DECLARE_HANDLE(name) typedef void *name
65 #define DECLARE_WIREM_HANDLE(name) typedef [wire_marshal(wire##name)] void*name
67 DECLARE_HANDLE(HMODULE);
68 DECLARE_HANDLE(HINSTANCE);
70 DECLARE_HANDLE(HTASK);
77 typedef unsigned __int64 DWORDLONG;
78 typedef __int64 LONGLONG;
79 typedef unsigned __int64 ULONGLONG;
81 typedef struct _LARGE_INTEGER {
85 typedef struct _ULARGE_INTEGER {
89 typedef struct _SID_IDENTIFIER_AUTHORITY {
91 } SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
95 UCHAR SubAuthorityCount;
96 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
97 [size_is(SubAuthorityCount)] ULONG SubAuthority[*];
100 typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
102 typedef struct _ACL {
111 typedef struct _SECURITY_DESCRIPTOR {
114 SECURITY_DESCRIPTOR_CONTROL Control;
119 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
121 cpp_quote("#endif /* winnt.h */")
123 cpp_quote("#ifndef _PALETTEENTRY_DEFINED")
124 cpp_quote("#define _PALETTEENTRY_DEFINED")
125 typedef struct tagPALETTEENTRY {
130 } PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
133 cpp_quote("#ifndef _LOGPALETTE_DEFINED")
134 cpp_quote("#define _LOGPALETTE_DEFINED")
135 typedef struct tagLOGPALETTE
139 [size_is(palNumEntries)] PALETTEENTRY palPalEntry[*];
140 } LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
143 cpp_quote("#ifndef _FILETIME_")
144 cpp_quote("#define _FILETIME_")
145 typedef struct _FILETIME {
147 DWORD dwHighDateTime;
148 } FILETIME, *PFILETIME, *LPFILETIME;
151 /******************** BASIC COM/OLE TYPES ********************/
153 typedef WCHAR OLECHAR;
154 typedef [string] OLECHAR *LPOLESTR;
155 typedef [string] const OLECHAR *LPCOLESTR;
156 cpp_quote("#ifndef __WINE__")
157 cpp_quote("#define OLESTR(str) WINE_UNICODE_TEXT(str)")
160 /* from Wine's pre-WIDL wtypes.h */
161 /* FIXME: does not belong here */
162 typedef CHAR OLECHAR16;
163 typedef LPSTR LPOLESTR16;
164 typedef LPCSTR LPCOLESTR16;
165 /* quoted because if BSTR16 is ever used in IDL files,
166 * it'll probably need some wire_marshal stuff too,
167 * and quoting these will detect any such necessity */
168 cpp_quote("typedef OLECHAR16 *BSTR16;")
169 cpp_quote("typedef BSTR16 *LPBSTR16;")
170 cpp_quote("#define OLESTR16(x) x")
174 typedef struct _COAUTHIDENTITY {
175 [size_is(UserLength+1)] USHORT *User;
177 [size_is(DomainLength+1)] USHORT *Domain;
179 [size_is(PasswordLength+1)] USHORT *Password;
180 ULONG PasswordLength;
184 typedef struct _COAUTHINFO {
187 LPWSTR pwszServerPrincName;
189 DWORD dwImpersonationLevel;
190 COAUTHIDENTITY *pAuthIdentityData;
191 DWORD dwCapabilities;
194 /* FIXME: COSERVERINFO was in Wine's pre-WIDL wtypes.h, but should be in objidl.idl */
195 typedef struct _COSERVERINFO {
198 COAUTHINFO *pAuthInfo;
202 typedef enum tagMEMCTX {
205 MEMCTX_MACSYSTEM = 3,
210 cpp_quote("#ifndef _ROTFLAGS_DEFINED")
211 cpp_quote("#define _ROTFLAGS_DEFINED")
212 cpp_quote("#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1")
213 cpp_quote("#define ROTFLAGS_ALLOWANYCLIENT 0x2")
216 typedef enum tagCLSCTX {
217 CLSCTX_INPROC_SERVER = 0x1,
218 CLSCTX_INPROC_HANDLER = 0x2,
219 CLSCTX_LOCAL_SERVER = 0x4,
220 CLSCTX_INPROC_SERVER16 = 0x8,
221 CLSCTX_REMOTE_SERVER = 0x10,
222 CLSCTX_INPROC_HANDLER16 = 0x20,
223 CLSCTX_INPROC_SERVERX86 = 0x40,
224 CLSCTX_INPROC_HANDLERX86 = 0x80,
225 CLSCTX_ESERVER_HANDLER = 0x100,
226 CLSCTX_NO_CODE_DOWNLOAD = 0x400,
227 CLSCTX_NO_CUSTOM_MARSHAL = 0x1000,
228 CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000,
229 CLSCTX_NO_FAILURE_LOG = 0x4000,
230 CLSCTX_DISABLE_AAA = 0x8000,
231 CLSCTX_ENABLE_AAA = 0x10000,
232 CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000
235 cpp_quote("#define CLSCTX_INPROC (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER)")
236 cpp_quote("#define CLSCTX_ALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)")
237 cpp_quote("#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)")
239 typedef enum tagMSHLFLAGS {
240 MSHLFLAGS_NORMAL = 0,
241 MSHLFLAGS_TABLESTRONG = 1,
242 MSHLFLAGS_TABLEWEAK = 2,
246 typedef enum tagMSHCTX {
248 MSHCTX_NOSHAREDMEM = 1,
249 MSHCTX_DIFFERENTMACHINE = 2,
254 /******************** BLOB TYPES ********************/
256 typedef struct _BYTE_BLOB {
257 unsigned long clSize;
258 [size_is(clSize)] byte abData[];
260 typedef [unique] BYTE_BLOB *UP_BYTE_BLOB;
262 typedef struct _FLAGGED_BYTE_BLOB {
263 unsigned long fFlags;
264 unsigned long clSize;
265 [size_is(clSize)] byte abData[];
267 typedef [unique] FLAGGED_BYTE_BLOB *UP_FLAGGED_BYTE_BLOB;
269 typedef struct _FLAGGED_WORD_BLOB {
270 unsigned long fFlags;
271 unsigned long clSize;
272 [size_is(clSize)] unsigned short asData[];
274 typedef [unique] FLAGGED_WORD_BLOB *UP_FLAGGED_WORD_BLOB;
276 typedef struct _BYTE_SIZEDARR {
277 unsigned long clSize;
278 [size_is(clSize)] byte *pData;
281 typedef struct _SHORT_SIZEDARR {
282 unsigned long clSize;
283 [size_is(clSize)] unsigned short *pData;
286 typedef struct _LONG_SIZEDARR {
287 unsigned long clSize;
288 [size_is(clSize)] unsigned long *pData;
291 typedef struct _HYPER_SIZEDARR {
292 unsigned long clSize;
293 [size_is(clSize)] hyper *pData;
296 /******************** GDI TYPES ********************/
298 const unsigned long WDT_INPROC_CALL = 0x48746457;
299 const unsigned long WDT_REMOTE_CALL = 0x52746457;
301 typedef union _userCLIPFORMAT switch(long fContext) u {
302 case WDT_INPROC_CALL: DWORD dwValue;
303 case WDT_REMOTE_CALL: LPWSTR pwszName;
306 typedef [unique] userCLIPFORMAT *wireCLIPFORMAT;
307 typedef [wire_marshal(wireCLIPFORMAT)] WORD CLIPFORMAT;
309 typedef struct tagRemHGLOBAL {
311 unsigned long cbData;
312 [size_is(cbData)] byte data[];
315 typedef union _userHGLOBAL switch(long fContext) u {
316 case WDT_INPROC_CALL: long hInproc;
317 case WDT_REMOTE_CALL: FLAGGED_BYTE_BLOB *hRemote;
318 default: long hGlobal;
321 typedef [unique] userHGLOBAL *wireHGLOBAL;
323 typedef struct tagRemHMETAFILEPICT {
327 unsigned long cbData;
328 [size_is(cbData)] byte data[];
331 typedef union _userHMETAFILE switch(long fContext) u {
332 case WDT_INPROC_CALL: long hInproc;
333 case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
334 default: long hGlobal;
337 typedef [unique] userHMETAFILE *wireHMETAFILE;
339 typedef struct _remoteMETAFILEPICT {
344 } remoteMETAFILEPICT;
346 typedef union _userHMETAFILEPICT switch(long fContext) u {
347 case WDT_INPROC_CALL: long hInproc;
348 case WDT_REMOTE_CALL: remoteMETAFILEPICT *hRemote;
349 default: long hGlobal;
352 typedef [unique] userHMETAFILEPICT *wireHMETAFILEPICT;
354 typedef struct tagRemHENHMETAFILE {
355 unsigned long cbData;
356 [size_is(cbData)] byte data[];
359 typedef union _userHENHMETAFILE switch(long fContext) u {
360 case WDT_INPROC_CALL: long hInproc;
361 case WDT_REMOTE_CALL: BYTE_BLOB *hRemote;
362 default: long hGlobal;
365 typedef [unique] userHENHMETAFILE *wireHENHMETAFILE;
367 typedef struct tagRemHBITMAP
369 unsigned long cbData;
370 [size_is(cbData)] byte data[];
373 typedef struct _userBITMAP {
381 [size_is(cbSize)] byte pBuffer[];
384 typedef union _userHBITMAP switch(long fContext) u {
385 case WDT_INPROC_CALL: long hInproc;
386 case WDT_REMOTE_CALL: userBITMAP *hRemote;
387 default: long hGlobal;
390 typedef [unique] userHBITMAP *wireHBITMAP;
392 typedef struct tagRemHPALETTE {
393 unsigned long cbData;
394 [size_is(cbData)] byte data[];
397 typedef struct tagrpcLOGPALETTE {
400 [size_is(palNumEntries)] PALETTEENTRY palPalEntry[];
403 typedef union _userHPALETTE switch(long fContext) u {
404 case WDT_INPROC_CALL: long hInproc;
405 case WDT_REMOTE_CALL: rpcLOGPALETTE *hRemote;
406 default: long hGlobal;
409 typedef [unique] userHPALETTE *wireHPALETTE;
412 DECLARE_WIREM_HANDLE(HGLOBAL);
413 typedef HGLOBAL HLOCAL;
414 DECLARE_WIREM_HANDLE(HBITMAP);
415 DECLARE_WIREM_HANDLE(HPALETTE);
416 DECLARE_WIREM_HANDLE(HENHMETAFILE);
417 DECLARE_WIREM_HANDLE(HMETAFILE);
419 DECLARE_WIREM_HANDLE(HMETAFILEPICT);
421 /******************** GUID TYPES ********************/
423 cpp_quote("#ifndef GUID_DEFINED")
424 cpp_quote("#define GUID_DEFINED")
425 typedef struct _GUID {
433 cpp_quote("#if 0 /* guiddef.h */")
434 typedef GUID *LPGUID;
440 typedef CLSID *LPCLSID;
443 typedef FMTID *LPFMTID;
445 cpp_quote("#if 0") /* for IDL only (C/C++ defs are in guiddef.h) */
446 typedef GUID *REFGUID;
448 typedef CLSID *REFCLSID;
449 typedef FMTID *REFFMTID;
452 cpp_quote("#endif /* guiddef.h */")
454 /******************** MISC TYPES ********************/
456 typedef enum tagDVASPECT {
457 DVASPECT_CONTENT = 1,
458 DVASPECT_THUMBNAIL = 2,
460 DVASPECT_DOCPRINT = 8
463 typedef enum tagSTGC {
466 STGC_ONLYIFCURRENT = 2,
467 STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
471 typedef enum tagSTGMOVE {
474 STGMOVE_SHALLOWCOPY = 2
477 typedef enum tagSTATFLAG {
478 STATFLAG_DEFAULT = 0,
483 /******************** OLE Automation ********************/
485 cpp_quote("#if 0") /* for IDL only */
486 typedef struct tagCY {
489 cpp_quote("#else") /* C/C++ defs */
490 cpp_quote("typedef union tagCY {")
491 cpp_quote(" struct {")
492 cpp_quote("#ifdef WORDS_BIGENDIAN")
493 cpp_quote(" LONG Hi;")
494 cpp_quote(" ULONG Lo;")
496 cpp_quote(" ULONG Lo;")
497 cpp_quote(" LONG Hi;")
499 cpp_quote(" } DUMMYSTRUCTNAME;")
500 cpp_quote(" LONGLONG int64;")
506 typedef struct tagDEC {
513 typedef DECIMAL *LPDECIMAL;
515 typedef [unique] FLAGGED_WORD_BLOB *wireBSTR;
516 typedef [wire_marshal(wireBSTR)] OLECHAR *BSTR;
517 typedef BSTR *LPBSTR;
519 typedef short VARIANT_BOOL;
520 typedef VARIANT_BOOL _VARIANT_BOOL;
521 cpp_quote("#define VARIANT_TRUE ((VARIANT_BOOL)0xFFFF)")
522 cpp_quote("#define VARIANT_FALSE ((VARIANT_BOOL)0x0000)")
524 typedef struct tagBSTRBLOB {
526 [size_is(cbSize)] BYTE *pData;
527 } BSTRBLOB, *LPBSTRBLOB;
529 typedef struct tagBLOB {
531 [size_is(cbSize)] BYTE *pBlobData;
534 typedef struct tagCLIPDATA {
537 [size_is(cbSize-sizeof(long))] BYTE *pClipData;
539 cpp_quote("#define CBPCLIPDATA(cb) ((cb).cbSize - sizeof((cb).ulClipFmt))")
541 typedef ULONG PROPID;
543 /******************** VARTYPE ********************/
545 typedef unsigned short VARTYPE;
583 VT_STREAMED_OBJECT = 68,
584 VT_STORED_OBJECT = 69,
588 VT_BSTR_BLOB = 0x0fff,
592 VT_RESERVED = 0x8000,
594 VT_ILLEGALMASKED = 0x0fff,
598 } /* interface IWinTypes */