Yet another attempt at fixing CW_USEDEFAULT handling.
[wine.git] / include / wtypes.h
blobd4607cae74feaa0d5acec0d11862b38332565d3c
1 /*
2 * Defines the basic types used by COM interfaces.
3 */
5 #ifndef __WINE_WTYPES_H
6 #define __WINE_WTYPES_H
9 #include "windef.h"
11 /* FIXME: this line should be in rpcndr.h */
12 typedef unsigned char byte;
14 /* FIXME: and the following group should be in rpcdce.h */
15 typedef void* RPC_AUTH_IDENTITY_HANDLE;
16 typedef void* RPC_AUTHZ_HANDLE;
19 typedef WORD CLIPFORMAT, *LPCLIPFORMAT;
21 typedef CHAR OLECHAR16;
22 typedef WCHAR OLECHAR;
24 typedef LPSTR LPOLESTR16;
25 typedef LPWSTR LPOLESTR;
27 typedef LPCSTR LPCOLESTR16;
28 typedef LPCWSTR LPCOLESTR;
30 typedef OLECHAR16 *BSTR16;
31 typedef OLECHAR *BSTR;
33 typedef BSTR16 *LPBSTR16;
34 typedef BSTR *LPBSTR;
36 #define OLESTR16(x) x
37 #define OLESTR(x) L##x
39 #ifndef GUID_DEFINED
40 #define GUID_DEFINED
41 typedef struct _GUID
43 DWORD Data1;
44 WORD Data2;
45 WORD Data3;
46 BYTE Data4[8];
47 } GUID;
48 #endif
50 typedef GUID *LPGUID;
51 typedef GUID CLSID,*LPCLSID;
52 typedef GUID IID,*LPIID;
53 typedef GUID FMTID,*LPFMTID;
54 #if defined(__cplusplus) && !defined(CINTERFACE)
55 #define REFGUID const GUID &
56 #define REFCLSID const CLSID &
57 #define REFIID const IID &
58 #define REFFMTID const FMTID &
59 #else /* !defined(__cplusplus) && !defined(CINTERFACE) */
60 #define REFGUID const GUID* const
61 #define REFCLSID const CLSID* const
62 #define REFIID const IID* const
63 #define REFFMTID const FMTID* const
64 #endif /* !defined(__cplusplus) && !defined(CINTERFACE) */
66 extern const IID GUID_NULL;
67 #define IID_NULL GUID_NULL
68 #define CLSID_NULL GUID_NULL
69 #define FMTID_NULL GUID_NULL
71 typedef enum tagDVASPECT
73 DVASPECT_CONTENT = 1,
74 DVASPECT_THUMBNAIL = 2,
75 DVASPECT_ICON = 4,
76 DVASPECT_DOCPRINT = 8
77 } DVASPECT;
79 typedef enum tagSTGC
81 STGC_DEFAULT = 0,
82 STGC_OVERWRITE = 1,
83 STGC_ONLYIFCURRENT = 2,
84 STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4
85 } STGC;
87 typedef struct _COAUTHIDENTITY
89 USHORT* User;
90 ULONG UserLength;
91 USHORT* Domain;
92 ULONG DomainLength;
93 USHORT* Password;
94 ULONG PasswordLength;
95 ULONG Flags;
96 } COAUTHIDENTITY;
98 typedef struct _COAUTHINFO
100 DWORD dwAuthnSvc;
101 DWORD dwAuthzSvc;
102 LPWSTR pwszServerPrincName;
103 DWORD dwAuthnLevel;
104 DWORD dwImpersonationLevel;
105 COAUTHIDENTITY* pAuthIdentityData;
106 DWORD dwCapabilities;
107 } COAUTHINFO;
109 typedef struct _COSERVERINFO
111 DWORD dwReserved1;
112 LPWSTR pwszName;
113 COAUTHINFO* pAuthInfo;
114 DWORD dwReserved2;
115 } COSERVERINFO;
117 typedef enum tagCLSCTX
119 CLSCTX_INPROC_SERVER = 0x1,
120 CLSCTX_INPROC_HANDLER = 0x2,
121 CLSCTX_LOCAL_SERVER = 0x4,
122 CLSCTX_INPROC_SERVER16 = 0x8,
123 CLSCTX_REMOTE_SERVER = 0x10,
124 CLSCTX_INPROC_HANDLER16 = 0x20,
125 CLSCTX_INPROC_SERVERX86 = 0x40,
126 CLSCTX_INPROC_HANDLERX86 = 0x80
127 } CLSCTX;
129 #define CLSCTX_INPROC (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER)
130 #define CLSCTX_ALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
131 #define CLSCTX_SERVER (CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
133 typedef unsigned short VARTYPE;
135 typedef ULONG PROPID;
137 #ifndef _tagBLOB_DEFINED
138 #define _tagBLOB_DEFINED
139 #define _BLOB_DEFINED
140 #define _LPBLOB_DEFINED
141 typedef struct tagBLOB
143 ULONG cbSize;
144 BYTE *pBlobData;
145 } BLOB, *LPBLOB;
146 #endif
148 #ifndef _tagCY_DEFINED
149 #define _tagCY_DEFINED
151 typedef union tagCY {
152 struct {
153 #ifdef BIG_ENDIAN
154 LONG Hi;
155 LONG Lo;
156 #else /* defined(BIG_ENDIAN) */
157 ULONG Lo;
158 LONG Hi;
159 #endif /* defined(BIG_ENDIAN) */
160 } DUMMYSTRUCTNAME;
161 LONGLONG int64;
162 } CY;
164 #endif /* _tagCY_DEFINED */
167 * 0 == FALSE and -1 == TRUE
169 #define VARIANT_TRUE ((VARIANT_BOOL)0xFFFF)
170 #define VARIANT_FALSE ((VARIANT_BOOL)0x0000)
171 typedef short VARIANT_BOOL,_VARIANT_BOOL;
173 typedef struct tagCLIPDATA
175 ULONG cbSize;
176 long ulClipFmt;
177 BYTE *pClipData;
178 } CLIPDATA;
180 /* Macro to calculate the size of the above pClipData */
181 #define CBPCLIPDATA(clipdata) ( (clipdata).cbSize - sizeof((clipdata).ulClipFmt) )
183 typedef LONG SCODE;
185 #ifndef _FILETIME_
186 #define _FILETIME_
187 /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
188 typedef struct
190 DWORD dwLowDateTime;
191 DWORD dwHighDateTime;
192 } FILETIME, *LPFILETIME;
193 #endif /* _FILETIME_ */
195 #ifndef _SECURITY_DEFINED
196 #define _SECURITY_DEFINED
198 typedef struct {
199 BYTE Value[6];
200 } SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY;
202 typedef struct _SID {
203 BYTE Revision;
204 BYTE SubAuthorityCount;
205 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
206 DWORD SubAuthority[1];
207 } SID,*PSID;
210 * ACL
213 typedef struct _ACL {
214 BYTE AclRevision;
215 BYTE Sbz1;
216 WORD AclSize;
217 WORD AceCount;
218 WORD Sbz2;
219 } ACL, *PACL;
221 typedef DWORD SECURITY_INFORMATION;
222 typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
223 typedef DWORD ACCESS_MASK, *PACCESS_MASK;
225 typedef PVOID PGENERIC_MAPPING;
227 /* The security descriptor structure */
228 typedef struct {
229 BYTE Revision;
230 BYTE Sbz1;
231 SECURITY_DESCRIPTOR_CONTROL Control;
232 PSID Owner;
233 PSID Group;
234 PACL Sacl;
235 PACL Dacl;
236 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
238 #ifndef _ROTFLAGS_DEFINED
239 #define _ROTFLAGS_DEFINED
240 #define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1
241 #define ROTFLAGS_ALLOWANYCLIENT 0x2
242 #endif /* !defined(_ROTFLAGS_DEFINED) */
244 #endif /* _SECURITY_DEFINED */
247 #endif /* __WINE_WTYPES_H */