wtypes.h 5.8 KB
Newer Older
1 2 3 4 5 6 7
/*
 * Defines the basic types used by COM interfaces.
 */

#ifndef __WINE_WTYPES_H
#define __WINE_WTYPES_H

8
#include "basetsd.h"
9
#include "guiddef.h"
Huw D M Davies's avatar
Huw D M Davies committed
10
#include "rpc.h"
11
#include "rpcndr.h"
12

13 14
typedef void* HMETAFILEPICT;

15
typedef WORD CLIPFORMAT, *LPCLIPFORMAT;
16

17
/* FIXME: does not belong here */
18 19 20 21 22
typedef CHAR		OLECHAR16;
typedef LPSTR		LPOLESTR16;
typedef LPCSTR		LPCOLESTR16;
typedef OLECHAR16	*BSTR16;
typedef BSTR16		*LPBSTR16;
23 24
#define OLESTR16(x) x

25 26 27 28 29 30 31 32
typedef WCHAR           OLECHAR;
typedef LPWSTR          LPOLESTR;
typedef LPCWSTR         LPCOLESTR;
typedef OLECHAR        *BSTR;
typedef BSTR           *LPBSTR;
#ifndef __WINE__
#define OLESTR(str)     WINE_UNICODE_TEXT(str)
#endif
33

34 35 36 37 38 39 40 41 42 43 44
#ifndef _DWORDLONG_
#define _DWORDLONG_
typedef __uint64 DWORDLONG, *PDWORDLONG;
#endif

#ifndef _ULONGLONG_
#define _ULONGLONG_
typedef __int64 LONGLONG, *PLONGLONG;
typedef __uint64 ULONGLONG, *PULONGLONG;
#endif

45 46 47 48 49 50 51
typedef enum tagDVASPECT
{ 
       DVASPECT_CONTENT   = 1,
       DVASPECT_THUMBNAIL = 2,
       DVASPECT_ICON      = 4,   
       DVASPECT_DOCPRINT  = 8
} DVASPECT;
52

53 54 55 56 57
typedef enum tagSTGC
{
	STGC_DEFAULT = 0,
	STGC_OVERWRITE = 1,
	STGC_ONLYIFCURRENT = 2,
58 59
	STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
	STGC_CONSOLIDATE = 8
60 61
} STGC;

62 63 64 65 66 67 68 69
typedef enum tagSTGMOVE
{   
	STGMOVE_MOVE = 0,
	STGMOVE_COPY = 1,
	STGMOVE_SHALLOWCOPY = 2
} STGMOVE;


70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
typedef struct _COAUTHIDENTITY
{
    USHORT* User;
    ULONG UserLength;
    USHORT* Domain;
    ULONG DomainLength;
    USHORT* Password;
    ULONG PasswordLength;
    ULONG Flags;
} COAUTHIDENTITY;

typedef struct _COAUTHINFO
{
    DWORD dwAuthnSvc;
    DWORD dwAuthzSvc;
    LPWSTR pwszServerPrincName;
    DWORD dwAuthnLevel;
    DWORD dwImpersonationLevel;
    COAUTHIDENTITY* pAuthIdentityData;
    DWORD dwCapabilities;
} COAUTHINFO;

typedef struct _COSERVERINFO
{
    DWORD dwReserved1;
    LPWSTR pwszName;
    COAUTHINFO* pAuthInfo;
    DWORD dwReserved2;
} COSERVERINFO;

100 101 102 103 104 105 106 107 108
typedef enum tagCLSCTX
{
    CLSCTX_INPROC_SERVER     = 0x1,
    CLSCTX_INPROC_HANDLER    = 0x2,
    CLSCTX_LOCAL_SERVER      = 0x4,
    CLSCTX_INPROC_SERVER16   = 0x8,
    CLSCTX_REMOTE_SERVER     = 0x10,
    CLSCTX_INPROC_HANDLER16  = 0x20,
    CLSCTX_INPROC_SERVERX86  = 0x40,
109 110
    CLSCTX_INPROC_HANDLERX86 = 0x80,
    CLSCTX_ESERVER_HANDLER   = 0x100
111 112 113 114 115 116
} CLSCTX;

#define CLSCTX_INPROC           (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER)
#define CLSCTX_ALL              (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
#define CLSCTX_SERVER           (CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)

117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
typedef enum tagMSHLFLAGS
{
    MSHLFLAGS_NORMAL        = 0,
    MSHLFLAGS_TABLESTRONG   = 1,
    MSHLFLAGS_TABLEWEAK     = 2,
    MSHLFLAGS_NOPING        = 4
} MSHLFLAGS;

typedef enum tagMSHCTX
{
    MSHCTX_LOCAL            = 0,
    MSHCTX_NOSHAREDMEM      = 1,
    MSHCTX_DIFFERENTMACHINE = 2,
    MSHCTX_INPROC           = 3
} MSHCTX;

133 134 135 136
typedef unsigned short VARTYPE;

typedef ULONG PROPID;

137 138 139 140
#ifndef _tagBLOB_DEFINED
#define _tagBLOB_DEFINED
#define _BLOB_DEFINED
#define _LPBLOB_DEFINED
141 142 143 144
typedef struct tagBLOB
{
    ULONG cbSize;
    BYTE *pBlobData;
145 146
} BLOB, *LPBLOB;
#endif
147 148 149

#ifndef _tagCY_DEFINED
#define _tagCY_DEFINED
150 151

typedef union tagCY {
152 153
    struct {
#ifdef BIG_ENDIAN
154 155 156 157 158 159 160
        LONG  Hi;
        LONG  Lo;
#else /* defined(BIG_ENDIAN) */
        ULONG Lo;
        LONG  Hi;
#endif /* defined(BIG_ENDIAN) */
    } DUMMYSTRUCTNAME;
161 162
    LONGLONG int64;
} CY;
163

164 165
#endif /* _tagCY_DEFINED */

166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
typedef struct tagDEC {
    USHORT wReserved;
    union {
        struct {
            BYTE scale;
            BYTE sign;
        } DUMMYSTRUCTNAME1;
        USHORT signscale;
    } DUMMYUNIONNAME1;
    ULONG Hi32;
    union {
        struct {
#ifdef BIG_ENDIAN
            ULONG Mid32;
            ULONG Lo32;
#else /* defined(BIG_ENDIAN) */
            ULONG Lo32;
            ULONG Mid32;
#endif /* defined(BIG_ENDIAN) */
        } DUMMYSTRUCTNAME2;
        ULONGLONG Lo64;
    } DUMMYUNIONNAME2;
} DECIMAL;

#define DECIMAL_NEG ((BYTE)0x80)
#ifndef NONAMELESSUNION
#define DECIMAL_SETZERO(d) \
        do {(d).Lo64 = 0; (d).Hi32 = 0; (d).signscale = 0;} while (0)
#else
#define DECIMAL_SETZERO(d) \
        do {(d).u2.Lo64 = 0; (d).Hi32 = 0; (d).u1.signscale = 0;} while (0)
#endif

199 200 201 202 203 204 205 206 207 208 209 210 211 212
/*
 * 0 == FALSE and -1 == TRUE
 */
#define VARIANT_TRUE     ((VARIANT_BOOL)0xFFFF)
#define VARIANT_FALSE    ((VARIANT_BOOL)0x0000)
typedef short VARIANT_BOOL,_VARIANT_BOOL;

typedef struct tagCLIPDATA
{
    ULONG cbSize;
    long ulClipFmt;
    BYTE *pClipData;
} CLIPDATA;

213
/* Macro to calculate the size of the above pClipData */
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
#define CBPCLIPDATA(clipdata)    ( (clipdata).cbSize - sizeof((clipdata).ulClipFmt) )

typedef LONG SCODE;

#ifndef _FILETIME_
#define _FILETIME_
/* 64 bit number of 100 nanoseconds intervals since January 1, 1601 */
typedef struct
{
  DWORD  dwLowDateTime;
  DWORD  dwHighDateTime;
} FILETIME, *LPFILETIME;
#endif /* _FILETIME_ */

#ifndef _SECURITY_DEFINED
#define _SECURITY_DEFINED

typedef struct {
    BYTE Value[6];
} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY;

typedef struct _SID {
    BYTE Revision;
    BYTE SubAuthorityCount;
    SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
    DWORD SubAuthority[1];
} SID,*PSID;

/*
 * ACL 
 */

typedef struct _ACL {
    BYTE AclRevision;
    BYTE Sbz1;
    WORD AclSize;
    WORD AceCount;
    WORD Sbz2;
} ACL, *PACL;

254
typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
255 256 257 258 259 260 261 262 263 264 265 266

/* The security descriptor structure */
typedef struct {
    BYTE Revision;
    BYTE Sbz1;
    SECURITY_DESCRIPTOR_CONTROL Control;
    PSID Owner;
    PSID Group;
    PACL Sacl;
    PACL Dacl;
} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR;

267 268
#endif /* _SECURITY_DEFINED */

Noomen Hamza's avatar
Noomen Hamza committed
269 270 271 272
#ifndef _ROTFLAGS_DEFINED
#define _ROTFLAGS_DEFINED
#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1
#define ROTFLAGS_ALLOWANYCLIENT 0x2
273
#endif /* !defined(_ROTFLAGS_DEFINED) */
Noomen Hamza's avatar
Noomen Hamza committed
274

275
#endif /* __WINE_WTYPES_H */