Adapted to cursor/icon handling changes.
[wine/multimedia.git] / include / wtypes.h
blob3089ae407b06f5bd4dfa5bb46bed13c3296bd3f3
1 /*
2 * Defines the basic types used by COM interfaces.
3 */
5 #ifndef __WINE_WTYPES_H
6 #define __WINE_WTYPES_H
9 #include "wintypes.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 #ifndef GUID_DEFINED
37 #define GUID_DEFINED
38 struct _GUID
40 DWORD Data1;
41 WORD Data2;
42 WORD Data3;
43 BYTE Data4[8];
45 #endif
47 typedef struct _GUID GUID,*LPGUID;
48 typedef struct _GUID CLSID,*LPCLSID;
49 typedef struct _GUID IID,*LPIID;
50 typedef struct _GUID FMTID,*LPFMTID;
51 #ifdef __cplusplus
52 #define REFGUID const GUID &
53 #define REFCLSID const CLSID &
54 #define REFIID const IID &
55 #define REFFMTID const FMTID &
56 #else // !__cplusplus
57 #define REFGUID const GUID* const
58 #define REFCLSID const CLSID* const
59 #define REFIID const IID* const
60 #define REFFMTID const FMTID* const
61 #endif // !__cplusplus
64 #define DECLARE_HANDLE(a) typedef HANDLE16 a##16; typedef HANDLE a
65 DECLARE_HANDLE(HMETAFILEPICT);
66 #undef DECLARE_HANDLE
68 typedef struct _COAUTHIDENTITY
70 USHORT* User;
71 ULONG UserLength;
72 USHORT* Domain;
73 ULONG DomainLength;
74 USHORT* Password;
75 ULONG PasswordLength;
76 ULONG Flags;
77 } COAUTHIDENTITY;
79 typedef struct _COAUTHINFO
81 DWORD dwAuthnSvc;
82 DWORD dwAuthzSvc;
83 LPWSTR pwszServerPrincName;
84 DWORD dwAuthnLevel;
85 DWORD dwImpersonationLevel;
86 COAUTHIDENTITY* pAuthIdentityData;
87 DWORD dwCapabilities;
88 } COAUTHINFO;
90 typedef struct _COSERVERINFO
92 DWORD dwReserved1;
93 LPWSTR pwszName;
94 COAUTHINFO* pAuthInfo;
95 DWORD dwReserved2;
96 } COSERVERINFO;
98 typedef enum tagCLSCTX
100 CLSCTX_INPROC_SERVER = 0x1,
101 CLSCTX_INPROC_HANDLER = 0x2,
102 CLSCTX_LOCAL_SERVER = 0x4,
103 CLSCTX_INPROC_SERVER16 = 0x8,
104 CLSCTX_REMOTE_SERVER = 0x10,
105 CLSCTX_INPROC_HANDLER16 = 0x20,
106 CLSCTX_INPROC_SERVERX86 = 0x40,
107 CLSCTX_INPROC_HANDLERX86 = 0x80
108 } CLSCTX;
110 #define CLSCTX_INPROC (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER)
111 #define CLSCTX_ALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
112 #define CLSCTX_SERVER (CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
114 typedef unsigned short VARTYPE;
116 typedef ULONG PROPID;
118 typedef struct tagBLOB
120 ULONG cbSize;
121 BYTE *pBlobData;
122 } BLOB;
124 #ifndef _tagCY_DEFINED
125 #define _tagCY_DEFINED
126 typedef union tagCY
128 struct {
129 #ifdef BIG_ENDIAN
130 long Hi;
131 long Lo;
132 #else
133 unsigned long Lo;
134 long Hi;
135 #endif
136 } u;
137 LONGLONG int64;
138 } CY;
139 #endif /* _tagCY_DEFINED */
142 * 0 == FALSE and -1 == TRUE
144 #define VARIANT_TRUE ((VARIANT_BOOL)0xFFFF)
145 #define VARIANT_FALSE ((VARIANT_BOOL)0x0000)
146 typedef short VARIANT_BOOL,_VARIANT_BOOL;
148 typedef struct tagCLIPDATA
150 ULONG cbSize;
151 long ulClipFmt;
152 BYTE *pClipData;
153 } CLIPDATA;
155 // Macro to calculate the size of the above pClipData
156 #define CBPCLIPDATA(clipdata) ( (clipdata).cbSize - sizeof((clipdata).ulClipFmt) )
158 typedef LONG SCODE;
160 #ifndef _FILETIME_
161 #define _FILETIME_
162 /* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
163 typedef struct
165 DWORD dwLowDateTime;
166 DWORD dwHighDateTime;
167 } FILETIME, *LPFILETIME;
168 #endif /* _FILETIME_ */
170 #ifndef _SECURITY_DEFINED
171 #define _SECURITY_DEFINED
173 typedef struct {
174 BYTE Value[6];
175 } SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY;
177 typedef struct _SID {
178 BYTE Revision;
179 BYTE SubAuthorityCount;
180 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
181 DWORD SubAuthority[1];
182 } SID,*PSID;
185 * ACL
188 typedef struct _ACL {
189 BYTE AclRevision;
190 BYTE Sbz1;
191 WORD AclSize;
192 WORD AceCount;
193 WORD Sbz2;
194 } ACL, *PACL;
196 typedef DWORD SECURITY_INFORMATION;
197 typedef WORD SECURITY_DESCRIPTOR_CONTROL;
199 /* The security descriptor structure */
200 typedef struct {
201 BYTE Revision;
202 BYTE Sbz1;
203 SECURITY_DESCRIPTOR_CONTROL Control;
204 PSID Owner;
205 PSID Group;
206 PACL Sacl;
207 PACL Dacl;
208 } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;
210 #endif /* _SECURITY_DEFINED */
213 #endif /* __WINE_WTYPES_H */