' ########################################################################################
' Microsoft Windows
' File: WTypes.inc
' Contents: Windows types.
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_WTypes_PBI)
#DEFINE PBX_WTypes_PBI
%WTYPES_INC = 1
'/* verify that the <rpcndr.h> version is high enough to compile this file*/
'#ifndef __REQUIRED_RPCNDR_H_VERSION__
'#define __REQUIRED_RPCNDR_H_VERSION__ 500
'#endif
'/* verify that the <rpcsal.h> version is high enough to compile this file*/
'#ifndef __REQUIRED_RPCSAL_H_VERSION__
'#define __REQUIRED_RPCSAL_H_VERSION__ 100
'#endif
'#include "rpc.h"
'#include "rpcndr.h"
'#ifndef __RPCNDR_H_VERSION__
'#error this stub requires an updated version of <rpcndr.h>
'#endif // __RPCNDR_H_VERSION__
'#ifndef __wtypes_h__
'#define __wtypes_h__
'#if defined(_MSC_VER) && (_MSC_VER >= 1020)
'#pragma once
'#endif
'/* Forward Declarations */
'/* header files for imported files */
'#include "basetsd.h"
'#include "guiddef.h"
#include once "basetsd.inc"
#include once "guiddef.inc"
'#ifdef __cplusplus
'extern "C"{
'#endif
'/* interface __MIDL_itf_wtypes_0000_0000 */
'/* [local] */
'//+-------------------------------------------------------------------------
'//
'// Microsoft Windows
'// Copyright (c) Microsoft Corporation. All rights reserved.
'//
'//--------------------------------------------------------------------------
'#if ( _MSC_VER >= 1020 )
'#pragma once
'#endif
'extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0000_v0_0_c_ifspec;
'extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0000_v0_0_s_ifspec;
'#ifndef __IWinTypes_INTERFACE_DEFINED__
'#define __IWinTypes_INTERFACE_DEFINED__
'/* interface IWinTypes */
'/* [unique][version][uuid] */
'typedef struct tagRemHGLOBAL
' {
' long fNullHGlobal;
' unsigned long cbData;
' byte data[ 1 ];
' } RemHGLOBAL;
'typedef struct tagRemHMETAFILEPICT
' {
' long mm;
' long xExt;
' long yExt;
' unsigned long cbData;
' byte data[ 1 ];
' } RemHMETAFILEPICT;
'typedef struct tagRemHENHMETAFILE
' {
' unsigned long cbData;
' byte data[ 1 ];
' } RemHENHMETAFILE;
'typedef struct tagRemHBITMAP
' {
' unsigned long cbData;
' byte data[ 1 ];
' } RemHBITMAP;
'typedef struct tagRemHPALETTE
' {
' unsigned long cbData;
' byte data[ 1 ];
' } RemHPALETTE;
'typedef struct tagRemBRUSH
' {
' unsigned long cbData;
' byte data[ 1 ];
' } RemHBRUSH;
'#if !defined(_WIN32) && !defined(_MPPC_)
'// The following code is for Win16 only
'#ifndef WINAPI // If not included with 3.1 headers...
'#define FAR _far
'#define PASCAL _pascal
'#define CDECL _cdecl
'#define VOID void
'#define WINAPI FAR PASCAL
'#define CALLBACK FAR PASCAL
'#ifndef FALSE
'#define FALSE 0
'#define TRUE 1
'#endif // !FALSE
'#ifndef _BYTE_DEFINED
'#define _BYTE_DEFINED
'typedef byte BYTE;
'#endif // !_BYTE_DEFINED
'#ifndef _WORD_DEFINED
'#define _WORD_DEFINED
'typedef unsigned short WORD;
'#endif // !_WORD_DEFINED
'typedef unsigned int UINT;
'typedef int INT;
'typedef long BOOL;
'#ifndef _LONG_DEFINED
'#define _LONG_DEFINED
'typedef long LONG;
'#endif // !_LONG_DEFINED
'#ifndef _WPARAM_DEFINED
'#define _WPARAM_DEFINED
'typedef UINT_PTR WPARAM;
'#endif // _WPARAM_DEFINED
'#ifndef _DWORD_DEFINED
'#define _DWORD_DEFINED
'typedef unsigned long DWORD;
'#endif // !_DWORD_DEFINED
'#ifndef _LPARAM_DEFINED
'#define _LPARAM_DEFINED
'typedef LONG_PTR LPARAM;
'#endif // !_LPARAM_DEFINED
'#ifndef _LRESULT_DEFINED
'#define _LRESULT_DEFINED
'typedef LONG_PTR LRESULT;
'#endif // !_LRESULT_DEFINED
'typedef void *HANDLE;
'typedef void *HMODULE;
'typedef void *HINSTANCE;
'typedef void *HTASK;
'typedef void *HKEY;
'typedef void *HDESK;
'typedef void *HMF;
'typedef void *HEMF;
'typedef void *HPEN;
'typedef void *HRSRC;
'typedef void *HSTR;
'typedef void *HWINSTA;
'typedef void *HKL;
'typedef void *HGDIOBJ;
'typedef HANDLE HDWP;
'#ifndef _HFILE_DEFINED
'#define _HFILE_DEFINED
'typedef INT HFILE;
'#endif // !_HFILE_DEFINED
'#ifndef _LPWORD_DEFINED
'#define _LPWORD_DEFINED
'typedef WORD *LPWORD;
'#endif // !_LPWORD_DEFINED
'#ifndef _LPDWORD_DEFINED
'#define _LPDWORD_DEFINED
'typedef DWORD *LPDWORD;
'#endif // !_LPDWORD_DEFINED
'typedef char CHAR;
'typedef /* [string] */ __RPC_string CHAR *LPSTR;
'typedef /* [string] */ __RPC_string const CHAR *LPCSTR;
'#ifndef _WCHAR_DEFINED
'#define _WCHAR_DEFINED
'typedef wchar_t WCHAR;
'typedef WCHAR TCHAR;
'#endif // !_WCHAR_DEFINED
'typedef /* [string] */ __RPC_string WCHAR *LPWSTR;
'typedef /* [string] */ __RPC_string TCHAR *LPTSTR;
'typedef /* [string] */ __RPC_string const WCHAR *LPCWSTR;
'typedef /* [string] */ __RPC_string const TCHAR *LPCTSTR;
'#ifndef _COLORREF_DEFINED
'#define _COLORREF_DEFINED
'typedef DWORD COLORREF;
'#endif // !_COLORREF_DEFINED
'#ifndef _LPCOLORREF_DEFINED
'#define _LPCOLORREF_DEFINED
'typedef DWORD *LPCOLORREF;
'#endif // !_LPCOLORREF_DEFINED
'typedef HANDLE *LPHANDLE;
'typedef struct _RECTL
' {
' LONG left;
' LONG top;
' LONG right;
' LONG bottom;
' } RECTL;
'typedef struct _RECTL *PRECTL;
'typedef struct _RECTL *LPRECTL;
#IF NOT %DEF(%RECTL_DEFINED)
%RECTL_DEFINED = 1
' // Size = 16 bytes
TYPE OLD_RECTL_STRUCT DWORD ' Old definition
 nLeft AS LONG ' LONG left
 nTop AS LONG ' LONG top
 nRight AS LONG ' LONG right
 nBottom AS LONG ' LONG bottom
END TYPE
' // Size = 16 bytes
TYPE tagRECTL DWORD
 Left AS LONG ' LONG left
 Top AS LONG ' LONG top
 Right AS LONG ' LONG right
 Bottom AS LONG ' LONG bottom
END TYPE
' // To allow the use of both nLeft, etc., and Left, etc.
' // Size = 16 bytes
UNION RECTL
 OLD_RECTL_STRUCT
 tagRECTL
END UNION
#ENDIF
'typedef struct tagPOINT
' {
' LONG x;
' LONG y;
' } POINT;
'typedef struct tagPOINT *PPOINT;
'typedef struct tagPOINT *LPPOINT;
' // POINT and POINTAPI are pre-defined in the PB compilers
'#IF NOT %DEF(%POINT_DEFINED)
'%POINT_DEFINED = 1
'' // Size = 8 bytes
'TYPE POINTAPI
' x AS LONG
' y AS LONG
'END TYPE
'MACRO tagPOINT = POINTAPI
'#ENDIF
'typedef struct _POINTL
' {
' LONG x;
' LONG y;
' } POINTL;
'typedef struct _POINTL *PPOINTL;
#IF NOT %DEF(%POINTL_DEFINED)
%POINTL_DEFINED = 1
' // Size = 8 bytes
TYPE POINTL DWORD
 x AS LONG ' LONG x
 y AS LONG ' LONG y
END TYPE
#ENDIF
'#ifndef WIN16
'typedef struct tagSIZE
' {
' LONG cx;
' LONG cy;
' } SIZE;
'typedef struct tagSIZE *PSIZE;
'typedef struct tagSIZE *LPSIZE;
#IF NOT %DEF(%SIZE_DEFINED)
%SIZE_DEFINED = 1
' // Size = 8 bytes
TYPE SIZE DWORD
 cx AS LONG ' LONG cx
 cy AS LONG ' LONG cy
END TYPE
' // Size = 8 bytes
TYPE APISIZE DWORD
 cx AS LONG ' LONG cx
 cy AS LONG ' LONG cy
END TYPE
MACRO tagSIZE = APISIZE
#ENDIF
'#else // WIN16
'typedef struct tagSIZE
'{
' INT cx;
' INT cy;
'} SIZE, *PSIZE, *LPSIZE;
'#endif // WIN16
'typedef struct tagSIZEL
' {
' LONG cx;
' LONG cy;
' } SIZEL;
'typedef struct tagSIZEL *PSIZEL;
'typedef struct tagSIZEL *LPSIZEL;
#IF NOT %DEF(%SIZEL_DEFINED)
%SIZEL_DEFINED = 1
' // Size = 8 bytes
TYPE SIZEL DWORD
 cx AS LONG ' LONG x
 cy AS LONG ' LONG y
END TYPE
#ENDIF
'#endif //WINAPI
'#endif //!WIN32 && !MPPC
'#ifndef _PALETTEENTRY_DEFINED
'#define _PALETTEENTRY_DEFINED
'typedef struct tagPALETTEENTRY
' {
' BYTE peRed;
' BYTE peGreen;
' BYTE peBlue;
' BYTE peFlags;
' } PALETTEENTRY;
'typedef struct tagPALETTEENTRY *PPALETTEENTRY;
'typedef struct tagPALETTEENTRY *LPPALETTEENTRY;
#IF NOT %DEF(%PALETTEENTRY_DEFINED)
%PALETTEENTRY_DEFINED = 1
' // Size = 4 bytes
TYPE PALETTEENTRY BYTE
 peRed AS BYTE ' BYTE peRed
 peGreen AS BYTE ' BYTE peGreen
 peBlue AS BYTE ' BYTE peBlue
 peFlags AS BYTE ' BYTE peFlags
END TYPE
TYPE LOGPALETTE256 BYTE
 palVersion AS WORD
 palNumEntries AS WORD
 palPalEntry(255) AS PALETTEENTRY ' Enough for 256 colors
END TYPE
#ENDIF
'#endif // !_PALETTEENTRY_DEFINED
'#ifndef _LOGPALETTE_DEFINED
'#define _LOGPALETTE_DEFINED
'typedef struct tagLOGPALETTE
' {
' WORD palVersion;
' WORD palNumEntries;
' PALETTEENTRY palPalEntry[ 1 ];
' } LOGPALETTE;
'typedef struct tagLOGPALETTE *PLOGPALETTE;
'typedef struct tagLOGPALETTE *LPLOGPALETTE;
#IF NOT %DEF(%LOGPALETTE_DEFINED)
%LOGPALETTE_DEFINED = 1
' // Size = 8 bytes
TYPE LOGPALETTE BYTE
 palVersion AS WORD ' WORD palVersion
 palNumEntries AS WORD ' WORD palNumEntries
 palPalEntry(0) AS PALETTEENTRY ' /* [size_is] */ PALETTEENTRY palPalEntry[ 1 ]
END TYPE
#ENDIF
'#endif // !_LOGPALETTE_DEFINED
'#if defined(_WIN32) && !defined(OLE2ANSI)
'typedef WCHAR OLECHAR;
'typedef /* [string] */ __RPC_string OLECHAR *LPOLESTR;
'typedef /* [string] */ __RPC_string const OLECHAR *LPCOLESTR;
'#define OLESTR(str) L##str
'#else
'typedef char OLECHAR;
'typedef LPSTR LPOLESTR;
'typedef LPCSTR LPCOLESTR;
'#define OLESTR(str) str
'#endif
'#ifndef _WINDEF_
'typedef const RECTL *LPCRECTL;
'typedef void *PVOID;
'typedef void *LPVOID;
'typedef float FLOAT;
'typedef struct tagRECT
' {
' LONG left;
' LONG top;
' LONG right;
' LONG bottom;
' } RECT;
'typedef struct tagRECT *PRECT;
'typedef struct tagRECT *LPRECT;
'typedef const RECT *LPCRECT;
#IF NOT %DEF(%RECT_DEFINED)
%RECT_DEFINED = 1
' // Size = 16 bytes
TYPE OLD_RECT_STRUCT DWORD ' Old PB definition
 nLeft AS LONG ' LONG left
 nTop AS LONG ' LONG top
 nRight AS LONG ' LONG right
 nBottom AS LONG ' LONG bottom
END TYPE
' // Size = 16 bytes
TYPE tagRECT DWORD
 Left AS LONG ' LONG left
 Top AS LONG ' LONG top
 Right AS LONG ' LONG right
 Bottom AS LONG ' LONG bottom
END TYPE
' // GDI+ uses x, y, Width and Height as members instead of Left, Right, Top and Bottom
TYPE GDIP_RECT_STRUCT DWORD
 x AS LONG ' LONG x
 y AS LONG ' LONG y
 Width AS LONG ' LONG Width
 Height AS LONG ' LONG Height
END TYPE
' // To allow the use of both nLeft, etc, and Left, etc.
' // Size = 16 bytes
UNION RECT
 OLD_RECT_STRUCT
 tagRECT
 GDIP_RECT_STRUCT
END UNION
#ENDIF
'#endif //_WINDEF_
'typedef unsigned char UCHAR;
'typedef short SHORT;
'typedef unsigned short USHORT;
'typedef DWORD ULONG;
'typedef double DOUBLE;
'#ifndef _DWORDLONG_
'typedef unsigned __int64 DWORDLONG;
'typedef DWORDLONG *PDWORDLONG;
'#endif // !_DWORDLONG_
'#ifndef _ULONGLONG_
'typedef __int64 LONGLONG;
'typedef unsigned __int64 ULONGLONG;
'typedef LONGLONG *PLONGLONG;
'typedef ULONGLONG *PULONGLONG;
'#endif // _ULONGLONG_
'#if 0
'typedef struct _LARGE_INTEGER
' {
' LONGLONG QuadPart;
' } LARGE_INTEGER;
'typedef LARGE_INTEGER *PLARGE_INTEGER;
#IF NOT %DEF(%LARGE_INTEGER_DEFINED)
%LARGE_INTEGER_DEFINED = 1
' // Size = 8 bytes
TYPE LARGE_INTEGER_STRUCT DWORD
 LowPart AS DWORD
 HighPart AS LONG
END TYPE
UNION LARGE_INTEGER QWORD
 LARGE_INTEGER_STRUCT
 QuadPart AS QUAD
END UNION
#ENDIF
'typedef struct _ULARGE_INTEGER
' {
' ULONGLONG QuadPart;
' } ULARGE_INTEGER;
#IF NOT %DEF(%ULARGE_INTEGER_DEFINED)
%ULARGE_INTEGER_DEFINED = 1
' // Size = 8 bytes
TYPE ULARGE_INTEGER_STRUCT DWORD
 LowPart AS DWORD
 HighPart AS DWORD
END TYPE
UNION ULARGE_INTEGER QWORD
 ULARGE_INTEGER_STRUCT
 QuadPart AS QUAD
END UNION
#ENDIF
'#endif // 0
'#ifndef _WINBASE_
'#ifndef _FILETIME_
'#define _FILETIME_
'typedef struct _FILETIME
' {
' DWORD dwLowDateTime;
' DWORD dwHighDateTime;
' } FILETIME;
'typedef struct _FILETIME *PFILETIME;
'typedef struct _FILETIME *LPFILETIME;
#IF NOT %DEF(%FILETIME_DEFINED)
%FILETIME_DEFINED = 1
' // Size = 8 bytes
TYPE FILETIME_STRUCT DWORD
 dwLowDateTime AS DWORD
 dwHighDateTime AS DWORD
END TYPE
' // To allow to use both DWORD's and a QUAD
' // Size = 8 bytes
UNION FILETIME DWORD
 FILETIME_STRUCT
 qDateTime AS QUAD
END UNION
#ENDIF
'#endif // !_FILETIME
'#ifndef _SYSTEMTIME_
'#define _SYSTEMTIME_
'typedef struct _SYSTEMTIME
' {
' WORD wYear;
' WORD wMonth;
' WORD wDayOfWeek;
' WORD wDay;
' WORD wHour;
' WORD wMinute;
' WORD wSecond;
' WORD wMilliseconds;
' } SYSTEMTIME;
'typedef struct _SYSTEMTIME *PSYSTEMTIME;
'typedef struct _SYSTEMTIME *LPSYSTEMTIME;
#IF NOT %DEF(%SYSTEMTIME_DEFINED)
%SYSTEMTIME_DEFINED = 1
' // Size = 16 bytes
TYPE SYSTEMTIME WORD
 wYear AS WORD ' WORD
 wMonth AS WORD ' WORD
 wDayOfWeek AS WORD ' WORD
 wDay AS WORD ' WORD
 wHour AS WORD ' WORD
 wMinute AS WORD ' WORD
 wSecond AS WORD ' WORD
 wMilliseconds AS WORD ' WORD
END TYPE
#ENDIF
'#endif // !_SYSTEMTIME
'#ifndef _SECURITY_ATTRIBUTES_
'#define _SECURITY_ATTRIBUTES_
'typedef struct _SECURITY_ATTRIBUTES
' {
' DWORD nLength;
' LPVOID lpSecurityDescriptor;
' BOOL bInheritHandle;
' } SECURITY_ATTRIBUTES;
'typedef struct _SECURITY_ATTRIBUTES *PSECURITY_ATTRIBUTES;
'typedef struct _SECURITY_ATTRIBUTES *LPSECURITY_ATTRIBUTES;
#IF NOT %DEF(%SECURITY_ATTRIBUTES_DEFINED)
%SECURITY_ATTRIBUTES_DEFINED = 1
' // Size = 12 bytes
TYPE SECURITY_ATTRIBUTES DWORD
 nLength AS DWORD
 lpSecurityDescriptor AS DWORD
 bInheritHandle AS LONG
END TYPE
#ENDIF
'#endif // !_SECURITY_ATTRIBUTES_
'#ifndef SECURITY_DESCRIPTOR_REVISION
'typedef USHORT SECURITY_DESCRIPTOR_CONTROL;
'typedef USHORT *PSECURITY_DESCRIPTOR_CONTROL;
'typedef PVOID PSID;
'typedef struct _ACL
' {
' UCHAR AclRevision;
' UCHAR Sbz1;
' USHORT AclSize;
' USHORT AceCount;
' USHORT Sbz2;
' } ACL;
'typedef ACL *PACL;
#IF NOT %DEF(%ACL_DEFINED)
%ACL_DEFINED = 1
' // Size = 8 bytes
TYPE ACL BYTE
 AclRevision AS BYTE ' UCHAR
 Sbz1 AS BYTE ' UCHAR
 AclSize AS WORD ' USHORT
 AceCount AS WORD ' USHORT
 Sbz2 AS WORD ' USHORT
END TYPE
#ENDIF
'#ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
'#define SID_IDENTIFIER_AUTHORITY_DEFINED
'typedef struct _SID_IDENTIFIER_AUTHORITY
' {
' UCHAR Value[ 6 ];
' } SID_IDENTIFIER_AUTHORITY;
'typedef struct _SID_IDENTIFIER_AUTHORITY *PSID_IDENTIFIER_AUTHORITY;
' Note: Value is declared as Value(0 TO 5) in PB's WIN32API.INC,
' but declaring it as STRING * 6 allows to use CHR$(x, x, x, x, x, x)
' and also to assign to it predefined constants.
#IF NOT %DEF(%SID_IDENTIFIER_AUTHORITY_DEFINED)
%SID_IDENTIFIER_AUTHORITY_DEFINED = 1
UNION SID_IDENTIFIER_AUTHORITY_UNION
 Value(5) AS BYTE
 Value AS STRING * 6
END UNION
' // Size = 6 bytes
TYPE SID_IDENTIFIER_AUTHORITY BYTE
 SID_IDENTIFIER_AUTHORITY_UNION
END TYPE
#ENDIF
'#endif
'#ifndef SID_DEFINED
'#define SID_DEFINED
'typedef struct _SID
' {
' BYTE Revision;
' BYTE SubAuthorityCount;
' SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
' ULONG SubAuthority[ 1 ];
' } SID;
'typedef struct _SID *PISID;
#IF NOT %DEF(%SID_DEFINED)
%SID_DEFINED = 1
' // Size = 12 bytes
TYPE SID BYTE
 Revision AS BYTE ' BYTE Revision
 SubAuthorityCount AS BYTE ' BYTE SubAuthorityCount
 IdentifierAuthority AS SID_IDENTIFIER_AUTHORITY ' SID_IDENTIFIER_AUTHORITY IdentifierAuthority
 SubAuthority(0) AS DWORD ' /* [size_is] */ ULONG SubAuthority[ 1 ]
END TYPE
#ENDIF
'typedef struct _SECURITY_DESCRIPTOR
' {
' UCHAR Revision;
' UCHAR Sbz1;
' SECURITY_DESCRIPTOR_CONTROL Control;
' PSID Owner;
' PSID Group;
' PACL Sacl;
' PACL Dacl;
' } SECURITY_DESCRIPTOR;
'typedef struct _SECURITY_DESCRIPTOR *PISECURITY_DESCRIPTOR;
#IF NOT %DEF(%SECURITY_DESCRIPTOR_DEFINED)
%SECURITY_DESCRIPTOR_DEFINED = 1
UNION SECURITY_DESCRIPTOR_CONTROL_UNION
 Control AS WORD ' SECURITY_DESCRIPTOR_CONTROL
 ' // For compatibility with the PB includes
 wControl AS WORD ' SECURITY_DESCRIPTOR_CONTROL
END UNION
' // Size = 20 bytes
TYPE SECURITY_DESCRIPTOR BYTE
 Revision AS BYTE ' BYTE
 Sbz1 AS BYTE ' BYTE
 SECURITY_DESCRIPTOR_CONTROL_UNION
 Owner AS SID PTR
 Group AS SID PTR
 Sacl AS ACL PTR
 Dacl AS ACL PTR
END TYPE
#ENDIF
'#endif // !SECURITY_DESCRIPTOR_REVISION
'#endif //_WINBASE_
'typedef struct _COAUTHIDENTITY
' {
' USHORT *User;
' ULONG UserLength;
' USHORT *Domain;
' ULONG DomainLength;
' USHORT *Password;
' ULONG PasswordLength;
' ULONG Flags;
' } COAUTHIDENTITY;
' // Size = 28 bytes
TYPE COAUTHIDENTITY DWORD FILL
 User AS WORD PTR ' /* [size_is] */ USHORT *User
 UserLength AS DWORD ' /* [range] */ ULONG UserLength
 Domain AS WORD PTR ' /* [size_is] */ USHORT *Domain
 DomainLength AS DWORD ' /* [range] */ ULONG DomainLength
 Password AS WORD PTR ' /* [size_is] */ USHORT *Password
 PasswordLength AS DWORD ' /* [range] */ ULONG PasswordLength
 Flags AS DWORD ' ULONG Flags
END TYPE
'typedef struct _COAUTHINFO
' {
' DWORD dwAuthnSvc;
' DWORD dwAuthzSvc;
' LPWSTR pwszServerPrincName;
' DWORD dwAuthnLevel;
' DWORD dwImpersonationLevel;
' COAUTHIDENTITY *pAuthIdentityData;
' DWORD dwCapabilities;
' } COAUTHINFO;
' // Size = 28 bytes
TYPE COAUTHINFO DWORD
 dwAuthnSvc AS DWORD
 dwAuthzSvc AS DWORD
 pwszServerPrincName AS WSTRINGZ PTR
 dwAuthnLevel AS DWORD
 dwImpersonationLevel AS DWORD
 pAuthIdentityData AS COAUTHIDENTITY PTR ' COAUTHIDENTITY *
 dwCapabilities AS DWORD
END TYPE
'typedef LONG SCODE;
'typedef SCODE *PSCODE;
'#ifndef _HRESULT_DEFINED
'#define _HRESULT_DEFINED
'#ifdef __midl
'typedef LONG HRESULT;
'#else // __midl
'typedef __success(return >= 0) long HRESULT;
'#endif // __midl
'#endif // !_HRESULT_DEFINED
'#ifndef __OBJECTID_DEFINED
'#define __OBJECTID_DEFINED
'#define _OBJECTID_DEFINED
'typedef struct _OBJECTID
' {
' GUID Lineage;
' unsigned long Uniquifier;
' } OBJECTID;
#IF NOT %DEF(%OBJECTID_DEFINED)
%OBJECTID_DEFINED = 1
' // Size = 20 bytes
TYPE OBJECTID DWORD
 Lineage AS GUID ' GUID
 Uniquifier AS DWORD ' unsigned long
END TYPE
#ENDIF
'#endif // !_OBJECTID_DEFINED
'#if 0
'typedef GUID *REFGUID;
'typedef IID *REFIID;
'typedef CLSID *REFCLSID;
'typedef FMTID *REFFMTID;
'#endif // 0
'typedef
'enum tagMEMCTX
' { MEMCTX_TASK = 1,
' MEMCTX_SHARED = 2,
' MEMCTX_MACSYSTEM = 3,
' MEMCTX_UNKNOWN = -1,
' MEMCTX_SAME = -2
' } MEMCTX;
' MEMCTX enum
%MEMCTX_TASK = 1
%MEMCTX_SHARED = 2
%MEMCTX_MACSYSTEM = 3
%MEMCTX_UNKNOWN = -1
%MEMCTX_SAME = -2
'#ifndef _ROTFLAGS_DEFINED
'#define _ROTFLAGS_DEFINED
'#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1
'#define ROTFLAGS_ALLOWANYCLIENT 0x2
'#endif // !_ROTFLAGS_DEFINED
'#ifndef _ROTREGFLAGS_DEFINED
'#define _ROTREGFLAGS_DEFINED
'#define ROTREGFLAGS_ALLOWANYCLIENT 0x1
'#endif // !_ROTREGFLAGS_DEFINED
'#ifndef _APPIDREGFLAGS_DEFINED
'#define _APPIDREGFLAGS_DEFINED
'#define APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP 0x1
'#define APPIDREGFLAGS_SECURE_SERVER_PROCESS_SD_AND_BIND 0x2
'#define APPIDREGFLAGS_ISSUE_ACTIVATION_RPC_AT_IDENTIFY 0x4
'#endif // !_APPIDREGFLAGS_DEFINED
'#ifndef _ROT_COMPARE_MAX_DEFINED
'#define _ROT_COMPARE_MAX_DEFINED
'#define ROT_COMPARE_MAX 2048
'#endif // !_ROT_COMPARE_MAX_DEFINED
'#ifndef _DCOMSCM_REMOTECALL_FLAGS_DEFINED
'#define _DCOMSCM_REMOTECALL_FLAGS_DEFINED
'#define DCOMSCM_ACTIVATION_USE_ALL_AUTHNSERVICES 0x1
'#define DCOMSCM_ACTIVATION_DISALLOW_UNSECURE_CALL 0x2
'#define DCOMSCM_RESOLVE_USE_ALL_AUTHNSERVICES 0x4
'#define DCOMSCM_RESOLVE_DISALLOW_UNSECURE_CALL 0x8
'#define DCOMSCM_PING_USE_MID_AUTHNSERVICE 0x10
'#define DCOMSCM_PING_DISALLOW_UNSECURE_CALL 0x20
'#endif // !_DCOMSCM_REMOTECALL_FLAGS_DEFINED
#IF NOT %DEF(%ROTFLAGS_DEFINED)
%ROTFLAGS_DEFINED = 1
%ROTFLAGS_REGISTRATIONKEEPSALIVE = &H1
%ROTFLAGS_ALLOWANYCLIENT = &H2
#ENDIF
#IF NOT %DEF(%ROTREGFLAGS_DEFINED)
%ROTREGFLAGS_DEFINED = 1
%ROTREGFLAGS_ALLOWANYCLIENT = &H1
#ENDIF
#IF NOT %DEF(%APPIDREGFLAGS_DEFINED)
%APPIDREGFLAGS_DEFINED = 1
%APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP = &H1
%APPIDREGFLAGS_SECURE_SERVER_PROCESS_SD_AND_BIND = &H2
%APPIDREGFLAGS_ISSUE_ACTIVATION_RPC_AT_IDENTIFY = &H4
#ENDIF
#IF NOT %DEF(%ROT_COMPARE_MAX_DEFINED)
%ROT_COMPARE_MAX_DEFINED = 1
%ROT_COMPARE_MAX = 2048
#ENDIF
#IF NOT %DEF(%DCOMSCM_REMOTECALL_FLAGS_DEFINED)
%DCOMSCM_REMOTECALL_FLAGS_DEFINED = 1
%DCOMSCM_ACTIVATION_USE_ALL_AUTHNSERVICES = &H1
%DCOMSCM_ACTIVATION_DISALLOW_UNSECURE_CALL = &H2
%DCOMSCM_RESOLVE_USE_ALL_AUTHNSERVICES = &H4
%DCOMSCM_RESOLVE_DISALLOW_UNSECURE_CALL = &H8
%DCOMSCM_PING_USE_MID_AUTHNSERVICE = &H10
%DCOMSCM_PING_DISALLOW_UNSECURE_CALL = &H20
#ENDIF
'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_RESERVED1 = 0x40,
' CLSCTX_RESERVED2 = 0x80,
' CLSCTX_RESERVED3 = 0x100,
' CLSCTX_RESERVED4 = 0x200,
' CLSCTX_NO_CODE_DOWNLOAD = 0x400,
' CLSCTX_RESERVED5 = 0x800,
' CLSCTX_NO_CUSTOM_MARSHAL = 0x1000,
' CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000,
' CLSCTX_NO_FAILURE_LOG = 0x4000,
' CLSCTX_DISABLE_AAA = 0x8000,
' CLSCTX_ENABLE_AAA = 0x10000,
' CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000,
' CLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000,
' CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000,
' CLSCTX_ENABLE_CLOAKING = 0x100000,
' CLSCTX_PS_DLL = ( int )0x80000000
' } CLSCTX;
'#define CLSCTX_VALID_MASK \
' (CLSCTX_INPROC_SERVER | \
' CLSCTX_INPROC_HANDLER | \
' CLSCTX_LOCAL_SERVER | \
' CLSCTX_INPROC_SERVER16 | \
' CLSCTX_REMOTE_SERVER | \
' CLSCTX_NO_CODE_DOWNLOAD | \
' CLSCTX_NO_CUSTOM_MARSHAL | \
' CLSCTX_ENABLE_CODE_DOWNLOAD | \
' CLSCTX_NO_FAILURE_LOG | \
' CLSCTX_DISABLE_AAA | \
' CLSCTX_ENABLE_AAA | \
' CLSCTX_FROM_DEFAULT_CONTEXT | \
' CLSCTX_ACTIVATE_32_BIT_SERVER | \
' CLSCTX_ACTIVATE_64_BIT_SERVER | \
' CLSCTX_ENABLE_CLOAKING | \
' CLSCTX_PS_DLL)
' CLSCTX enum
%CLSCTX_INPROC_SERVER = &H1 ' Component is allowed in the same process space.
 ' Requires that the component be implemented as a DLL
%CLSCTX_INPROC_HANDLER = &H2 ' Part is in-proc and the rest local or remote
%CLSCTX_LOCAL_SERVER = &H4 ' Different process, same machine
%CLSCTX_INPROC_SERVER16 = &H8
%CLSCTX_REMOTE_SERVER = &H10 ' Components may reside on remote computers (DCOM)
%CLSCTX_INPROC_HANDLER16 = &H20
%CLSCTX_RESERVED1 = &H40
%CLSCTX_RESERVED2 = &H80
%CLSCTX_RESERVED3 = &H100
%CLSCTX_RESERVED4 = &H200
%CLSCTX_NO_CODE_DOWNLOAD = &H400
%CLSCTX_RESERVED5 = &H800
%CLSCTX_NO_CUSTOM_MARSHAL = &H1000
%CLSCTX_ENABLE_CODE_DOWNLOAD = &H2000
%CLSCTX_NO_FAILURE_LOG = &H4000
%CLSCTX_DISABLE_AAA = &H8000
%CLSCTX_ENABLE_AAA = &H10000
%CLSCTX_FROM_DEFAULT_CONTEXT = &H20000
%CLSCTX_ACTIVATE_32_BIT_SERVER = &H40000
%CLSCTX_ACTIVATE_64_BIT_SERVER = &H80000
%CLSCTX_ENABLE_CLOAKING = &H100000
%CLSCTX_PS_DLL = &H80000000& ' ( int )0x80000000
%CLSCTX_VALID_MASK = %CLSCTX_INPROC_SERVER OR %CLSCTX_INPROC_HANDLER OR %CLSCTX_LOCAL_SERVER OR %CLSCTX_INPROC_SERVER16 OR %CLSCTX_REMOTE_SERVER OR %CLSCTX_NO_CODE_DOWNLOAD OR %CLSCTX_NO_CUSTOM_MARSHAL OR %CLSCTX_ENABLE_CODE_DOWNLOAD OR %CLSCTX_NO_FAILURE_LOG OR %CLSCTX_DISABLE_AAA OR %CLSCTX_ENABLE_AAA OR %CLSCTX_FROM_DEFAULT_CONTEXT OR %CLSCTX_ACTIVATE_32_BIT_SERVER OR %CLSCTX_ACTIVATE_64_BIT_SERVER OR %CLSCTX_ENABLE_CLOAKING OR %CLSCTX_PS_DLL
'typedef
'enum tagMSHLFLAGS
' { MSHLFLAGS_NORMAL = 0,
' MSHLFLAGS_TABLESTRONG = 1,
' MSHLFLAGS_TABLEWEAK = 2,
' MSHLFLAGS_NOPING = 4,
' MSHLFLAGS_RESERVED1 = 8,
' MSHLFLAGS_RESERVED2 = 16,
' MSHLFLAGS_RESERVED3 = 32,
' MSHLFLAGS_RESERVED4 = 64
' } MSHLFLAGS;
' MSHLFLAGS enum
%MSHLFLAGS_NORMAL = 0
%MSHLFLAGS_TABLESTRONG = 1
%MSHLFLAGS_TABLEWEAK = 2
%MSHLFLAGS_NOPING = 4
%MSHLFLAGS_RESERVED1 = 8
%MSHLFLAGS_RESERVED2 = 16
%MSHLFLAGS_RESERVED3 = 32
%MSHLFLAGS_RESERVED4 = 64
'typedef
'enum tagMSHCTX
' { MSHCTX_LOCAL = 0,
' MSHCTX_NOSHAREDMEM = 1,
' MSHCTX_DIFFERENTMACHINE = 2,
' MSHCTX_INPROC = 3,
' MSHCTX_CROSSCTX = 4
' } MSHCTX;
' MSHCTX enum
%MSHCTX_LOCAL = 0
%MSHCTX_NOSHAREDMEM = 1
%MSHCTX_DIFFERENTMACHINE = 2
%MSHCTX_INPROC = 3
%MSHCTX_CROSSCTX = 4
'typedef
'enum tagDVASPECT
' { DVASPECT_CONTENT = 1,
' DVASPECT_THUMBNAIL = 2,
' DVASPECT_ICON = 4,
' DVASPECT_DOCPRINT = 8
' } DVASPECT;
' DVASPECT enum
%DVASPECT_CONTENT = 1
%DVASPECT_THUMBNAIL = 2
%DVASPECT_ICON = 4
%DVASPECT_DOCPRINT = 8
'typedef
'enum tagSTGC
' { STGC_DEFAULT = 0,
' STGC_OVERWRITE = 1,
' STGC_ONLYIFCURRENT = 2,
' STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
' STGC_CONSOLIDATE = 8
' } STGC;
' STGC enum
%STGC_DEFAULT = 0
%STGC_OVERWRITE = 1
%STGC_ONLYIFCURRENT = 2
%STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4
%STGC_CONSOLIDATE = 8
'typedef
'enum tagSTGMOVE
' { STGMOVE_MOVE = 0,
' STGMOVE_COPY = 1,
' STGMOVE_SHALLOWCOPY = 2
' } STGMOVE;
' STGMOVE enum
%STGMOVE_MOVE = 0
%STGMOVE_COPY = 1
%STGMOVE_SHALLOWCOPY = 2
'typedef
'enum tagSTATFLAG
' { STATFLAG_DEFAULT = 0,
' STATFLAG_NONAME = 1,
' STATFLAG_NOOPEN = 2
' } STATFLAG;
' STATFLAG enum
%STATFLAG_DEFAULT = 0
%STATFLAG_NONAME = 1
%STATFLAG_NOOPEN = 2
'typedef /* [context_handle] */ void *HCONTEXT;
'#ifndef _LCID_DEFINED
'#define _LCID_DEFINED
'typedef DWORD LCID;
'#endif // !_LCID_DEFINED
'#ifndef _LANGID_DEFINED
'#define _LANGID_DEFINED
'typedef USHORT LANGID;
'#endif // !_LANGID_DEFINED
'typedef struct _BYTE_BLOB
' {
' unsigned long clSize;
' byte abData[ 1 ];
' } BYTE_BLOB;
'typedef /* [unique] */ __RPC_unique_pointer BYTE_BLOB *UP_BYTE_BLOB;
' // Size = 8 bytes
TYPE BYTE_BLOB DWORD
 clSize AS DWORD ' unsigned long clSize
 abData(0) AS BYTE ' /* [size_is] */ byte abData[ 1 ]
END TYPE
'typedef struct _WORD_BLOB
' {
' unsigned long clSize;
' unsigned short asData[ 1 ];
' } WORD_BLOB;
'typedef /* [unique] */ __RPC_unique_pointer WORD_BLOB *UP_WORD_BLOB;
' // Size = 8 bytes
TYPE WORD_BLOB DWORD
 clSize AS DWORD ' unsigned long clSize
 asData(0) AS WORD ' /* [size_is] */ unsigned short asData[ 1 ]
END TYPE
'typedef struct _DWORD_BLOB
' {
' unsigned long clSize;
' unsigned long alData[ 1 ];
' } DWORD_BLOB;
'typedef /* [unique] */ __RPC_unique_pointer DWORD_BLOB *UP_DWORD_BLOB;
' // Size = 8 bytes
TYPE DWORD_BLOB DWORD
 clSize AS DWORD ' unsigned long clSize
 alData(0) AS DWORD ' /* [size_is] */ unsigned long alData[ 1 ]
END TYPE
'typedef struct _FLAGGED_BYTE_BLOB
' {
' unsigned long fFlags;
' unsigned long clSize;
' byte abData[ 1 ];
' } FLAGGED_BYTE_BLOB;
'typedef /* [unique] */ __RPC_unique_pointer FLAGGED_BYTE_BLOB *UP_FLAGGED_BYTE_BLOB;
' // Size = 12 bytes
TYPE FLAGGED_BYTE_BLOB DWORD
 fFlags AS DWORD ' unsigned long fFlags
 clSize AS DWORD ' unsigned long clSize
 abData(0) AS BYTE ' /* [size_is] */ byte abData[ 1 ]
END TYPE
'typedef struct _FLAGGED_WORD_BLOB
' {
' unsigned long fFlags;
' unsigned long clSize;
' unsigned short asData[ 1 ];
' } FLAGGED_WORD_BLOB;
'typedef /* [unique] */ __RPC_unique_pointer FLAGGED_WORD_BLOB *UP_FLAGGED_WORD_BLOB;
' // Size = 12 bytes
TYPE FLAGGED_WORD_BLOB DWORD
 fFlags AS DWORD ' unsigned long fFlags
 clSize AS DWORD ' unsigned long clSize
 asData(0) AS WORD ' /* [size_is] */ unsigned short asData[ 1 ]
END TYPE
'typedef struct _BYTE_SIZEDARR
' {
' unsigned long clSize;
' byte *pData;
' } BYTE_SIZEDARR;
' // Size = 8 bytes
TYPE BYTE_SIZEDARR DWORD
 clSize AS DWORD ' unsigned long
 pData AS BYTE PTR ' byte *
END TYPE
'typedef struct _SHORT_SIZEDARR
' {
' unsigned long clSize;
' unsigned short *pData;
' } WORD_SIZEDARR;
' // Size = 8 bytes
TYPE SHORT_SIZEDARR DWORD
 clSize AS DWORD ' unsigned long
 pData AS WORD PTR ' unsigned short *
END TYPE
MACRO WORD_SIZEDARR = SHORT_SIZEDARR
'typedef struct _LONG_SIZEDARR
' {
' unsigned long clSize;
' unsigned long *pData;
' } DWORD_SIZEDARR;
' // Size = 8 bytes
TYPE LONG_SIZEDARR DWORD
 clSize AS DWORD ' unsigned long
 pData AS DWORD PTR ' unsigned long *
END TYPE
MACRO DWORD_SIZEDARR = LONG_SIZEDARR
'typedef struct _HYPER_SIZEDARR
' {
' unsigned long clSize;
' hyper *pData;
' } HYPER_SIZEDARR;
' // Size = 8 bytes
TYPE HYPER_SIZEDARR DWORD
 clSize AS DWORD ' unsigned long
 pData AS QUAD PTR ' hyper *
END TYPE
'#define WDT_INPROC_CALL ( 0x48746457 )
'#define WDT_REMOTE_CALL ( 0x52746457 )
'#define WDT_INPROC64_CALL ( 0x50746457 )
%WDT_INPROC_CALL = &H48746457
%WDT_REMOTE_CALL = &H52746457
%WDT_INPROC64_CALL = &H50746457
'typedef struct _userCLIPFORMAT
' {
' long fContext;
' /* [switch_type] */ union __MIDL_IWinTypes_0001
' {
' DWORD dwValue;
' wchar_t *pwszName;
' } u;
' } userCLIPFORMAT;
'typedef /* [unique] */ __RPC_unique_pointer userCLIPFORMAT *wireCLIPFORMAT;
'typedef /* [wire_marshal] */ WORD CLIPFORMAT;
'typedef struct _GDI_NONREMOTE
' {
' long fContext;
' /* [switch_type] */ union __MIDL_IWinTypes_0002
' {
' long hInproc;
' DWORD_BLOB *hRemote;
' } u;
' } GDI_NONREMOTE;
'typedef struct _userHGLOBAL
' {
' long fContext;
' /* [switch_type] */ union __MIDL_IWinTypes_0003
' {
' long hInproc;
' FLAGGED_BYTE_BLOB *hRemote;
' } u;
' } userHGLOBAL;
'typedef /* [unique] */ __RPC_unique_pointer userHGLOBAL *wireHGLOBAL;
'typedef struct _userHMETAFILE
' {
' long fContext;
' /* [switch_type] */ union __MIDL_IWinTypes_0004
' {
' long hInproc;
' BYTE_BLOB *hRemote;
' } u;
' } userHMETAFILE;
'typedef struct _remoteMETAFILEPICT
' {
' long mm;
' long xExt;
' long yExt;
' userHMETAFILE *hMF;
' } remoteMETAFILEPICT;
'typedef struct _userHMETAFILEPICT
' {
' long fContext;
' /* [switch_type] */ union __MIDL_IWinTypes_0005
' {
' long hInproc;
' remoteMETAFILEPICT *hRemote;
' } u;
' } userHMETAFILEPICT;
'typedef struct _userHENHMETAFILE
' {
' long fContext;
' /* [switch_type] */ union __MIDL_IWinTypes_0006
' {
' long hInproc;
' BYTE_BLOB *hRemote;
' } u;
' } userHENHMETAFILE;
'typedef struct _userBITMAP
' {
' LONG bmType;
' LONG bmWidth;
' LONG bmHeight;
' LONG bmWidthBytes;
' WORD bmPlanes;
' WORD bmBitsPixel;
' ULONG cbSize;
' byte pBuffer[ 1 ];
' } userBITMAP;
'typedef struct _userHBITMAP
' {
' long fContext;
' /* [switch_type] */ union __MIDL_IWinTypes_0007
' {
' long hInproc;
' userBITMAP *hRemote;
' } u;
' } userHBITMAP;
'typedef struct _userHPALETTE
' {
' long fContext;
' /* [switch_type] */ union __MIDL_IWinTypes_0008
' {
' long hInproc;
' LOGPALETTE *hRemote;
' } u;
' } userHPALETTE;
'typedef struct _RemotableHandle
' {
' long fContext;
' /* [switch_type] */ union __MIDL_IWinTypes_0009
' {
' long hInproc;
' long hRemote;
' } u;
' } RemotableHandle;
'typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHWND;
'typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHMENU;
'typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHACCEL;
'typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHBRUSH;
'typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHFONT;
'typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHDC;
'typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHICON;
'typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHRGN;
'#if 0
'typedef /* [wire_marshal] */ void *HWND;
'typedef /* [wire_marshal] */ void *HMENU;
'typedef /* [wire_marshal] */ void *HACCEL;
'typedef /* [wire_marshal] */ void *HBRUSH;
'typedef /* [wire_marshal] */ void *HFONT;
'typedef /* [wire_marshal] */ void *HDC;
'typedef /* [wire_marshal] */ void *HICON;
'typedef /* [wire_marshal] */ void *HRGN;
'#ifndef _HCURSOR_DEFINED
'#define _HCURSOR_DEFINED
'typedef HICON HCURSOR;
'#endif // !_HCURSOR_DEFINED
'#endif //0
'#ifndef _TEXTMETRIC_DEFINED
'#define _TEXTMETRIC_DEFINED
'typedef struct tagTEXTMETRICW
' {
' LONG tmHeight;
' LONG tmAscent;
' LONG tmDescent;
' LONG tmInternalLeading;
' LONG tmExternalLeading;
' LONG tmAveCharWidth;
' LONG tmMaxCharWidth;
' LONG tmWeight;
' LONG tmOverhang;
' LONG tmDigitizedAspectX;
' LONG tmDigitizedAspectY;
' WCHAR tmFirstChar;
' WCHAR tmLastChar;
' WCHAR tmDefaultChar;
' WCHAR tmBreakChar;
' BYTE tmItalic;
' BYTE tmUnderlined;
' BYTE tmStruckOut;
' BYTE tmPitchAndFamily;
' BYTE tmCharSet;
' } TEXTMETRICW;
'typedef struct tagTEXTMETRICW *PTEXTMETRICW;
'typedef struct tagTEXTMETRICW *LPTEXTMETRICW;
#IF NOT %DEF(%TEXTMETRIC_DEFINED)
%TEXTMETRIC_DEFINED = 1
TYPE TEXTMETRICA ' Must be 4 byte aligned
 tmHeight AS LONG
 tmAscent AS LONG
 tmDescent AS LONG
 tmInternalLeading AS LONG
 tmExternalLeading AS LONG
 tmAveCharWidth AS LONG
 tmMaxCharWidth AS LONG
 tmWeight AS LONG
 tmOverhang AS LONG
 tmDigitizedAspectX AS LONG
 tmDigitizedAspectY AS LONG
 tmFirstChar AS STRING * 1 ' BYTE [must be char]
 tmLastChar AS STRING * 1 ' BYTE [must be char]
 tmDefaultChar AS STRING * 1 ' BYTE [must be char]
 tmBreakChar AS STRING * 1 ' BYTE [must be char]
 tmItalic AS BYTE ' BYTE
 tmUnderlined AS BYTE ' BYTE
 tmStruckOut AS BYTE ' BYTE
 tmPitchAndFamily AS BYTE ' BYTE
 tmCharSet AS BYTE ' BYTE
 alignment__(2) AS BYTE ' // To keep DWORD alignment
END TYPE
' // Size = 60 bytes
TYPE TEXTMETRICW ' Must be 4 byte aligned
 tmHeight AS LONG
 tmAscent AS LONG
 tmDescent AS LONG
 tmInternalLeading AS LONG
 tmExternalLeading AS LONG
 tmAveCharWidth AS LONG
 tmMaxCharWidth AS LONG
 tmWeight AS LONG
 tmOverhang AS LONG
 tmDigitizedAspectX AS LONG
 tmDigitizedAspectY AS LONG
 tmFirstChar AS WSTRING * 1 ' WCHAR
 tmLastChar AS WSTRING * 1 ' WCHAR
 tmDefaultChar AS WSTRING * 1 ' WCHAR
 tmBreakChar AS WSTRING * 1 ' WCHAR
 tmItalic AS BYTE ' BYTE
 tmUnderlined AS BYTE ' BYTE
 tmStruckOut AS BYTE ' BYTE
 tmPitchAndFamily AS BYTE ' BYTE
 tmCharSet AS BYTE ' BYTE
 alignment__(2) AS BYTE ' // To keep DWORD alignment
END TYPE
#IF %DEF(%UNICODE)
 MACRO TEXTMETRIC = TEXTMETRICW
#ELSE
 MACRO TEXTMETRIC = TEXTMETRICA
#ENDIF
#ENDIF
'#endif // !_TEXTMETRIC_DEFINED
'#ifndef _WIN32 // The following code is for Win16 only
'#ifndef WINAPI // If not included with 3.1 headers...
'typedef struct tagMSG
' {
' HWND hwnd;
' UINT message;
' WPARAM wParam;
' LPARAM lParam;
' DWORD time;
' POINT pt;
' } MSG;
'typedef struct tagMSG *PMSG;
'typedef struct tagMSG *NPMSG;
'typedef struct tagMSG *LPMSG;
#IF NOT %DEF(%MSG_DEFINED)
%MSG_DEFINED = 1
' // Size = 28 bytes
TYPE tagMSG DWORD
 hwnd AS DWORD
 message AS DWORD ' UINT
 wParam AS DWORD ' WPARAM
 lParam AS LONG
 time AS DWORD
 pt AS POINT
END TYPE
#ENDIF
'#endif // _WIN32
'#endif // WINAPI
'typedef /* [unique] */ __RPC_unique_pointer userHBITMAP *wireHBITMAP;
'typedef /* [unique] */ __RPC_unique_pointer userHPALETTE *wireHPALETTE;
'typedef /* [unique] */ __RPC_unique_pointer userHENHMETAFILE *wireHENHMETAFILE;
'typedef /* [unique] */ __RPC_unique_pointer userHMETAFILE *wireHMETAFILE;
'typedef /* [unique] */ __RPC_unique_pointer userHMETAFILEPICT *wireHMETAFILEPICT;
'#if 0
'typedef /* [wire_marshal] */ void *HGLOBAL;
'typedef HGLOBAL HLOCAL;
'typedef /* [wire_marshal] */ void *HBITMAP;
'typedef /* [wire_marshal] */ void *HPALETTE;
'typedef /* [wire_marshal] */ void *HENHMETAFILE;
'typedef /* [wire_marshal] */ void *HMETAFILE;
'#endif //0
'typedef /* [wire_marshal] */ void *HMETAFILEPICT;
'extern RPC_IF_HANDLE IWinTypes_v0_1_c_ifspec;
'extern RPC_IF_HANDLE IWinTypes_v0_1_s_ifspec;
'#endif /* __IWinTypes_INTERFACE_DEFINED__ */
'/* interface __MIDL_itf_wtypes_0000_0001 */
'/* [local] */
'#if ( _MSC_VER >= 800 )
'#if _MSC_VER >= 1200
'#pragma warning(push)
'#endif
'#pragma warning(disable:4201)
'#endif
'typedef double DATE;
'#ifndef _tagCY_DEFINED
'#define _tagCY_DEFINED
'#define _CY_DEFINED
'#if 0
'/* the following isn't the real definition of CY, but it is */
'/* what RPC knows how to remote */
'typedef struct tagCY
' {
' LONGLONG int64;
' } CY;
'#else /* 0 */
'/* real definition that makes the C++ compiler happy */
'typedef union tagCY {
' struct {
'#ifdef _MAC
' long Hi;
' long Lo;
'#else
' unsigned long Lo;
' long Hi;
'#endif
' } DUMMYSTRUCTNAME;
' LONGLONG int64;
'} CY;
'#endif /* 0 */
'#endif /* _tagCY_DEFINED */
'typedef CY *LPCY;
' unsigned long Lo;
' long Hi;
'#endif
' } DUMMYSTRUCTNAME;
' LONGLONG int64;
#IF NOT %DEF(%CY_DEFINED)
 %CY_DEFINED = 1
TYPE tagCY_STRUCT
 Lo AS DWORD
 Hi AS LONG
END TYPE
UNION tagCY
 tagCY_STRUCT
 int64 AS QUAD
END UNION
MACRO tagCURRENCY_DEFINED = tagCY
#ENDIF
'#if 0 /* _tagDEC_DEFINED */
'/* The following isn't the real definition of Decimal type, */
'/* but it is what RPC knows how to remote */
'typedef struct tagDEC
' {
' USHORT wReserved;
' BYTE scale;
' BYTE sign;
' ULONG Hi32;
' ULONGLONG Lo64;
' } DECIMAL;
'#else /* _tagDEC_DEFINED */
'/* real definition that makes the C++ compiler happy */
'typedef struct tagDEC {
' USHORT wReserved;
' union {
' struct {
' BYTE scale;
' BYTE sign;
' } DUMMYSTRUCTNAME;
' USHORT signscale;
' } DUMMYUNIONNAME;
' ULONG Hi32;
' union {
' struct {
'#ifdef _MAC
' ULONG Mid32;
' ULONG Lo32;
'#else
' ULONG Lo32;
' ULONG Mid32;
'#endif
' } DUMMYSTRUCTNAME2;
' ULONGLONG Lo64;
' } DUMMYUNIONNAME2;
'} DECIMAL;
'#define DECIMAL_NEG ((BYTE)0x80)
'#define DECIMAL_SETZERO(dec) \
' {(dec).Lo64 = 0; (dec).Hi32 = 0; (dec).signscale = 0;}
'#endif /* _tagDEC_DEFINED */
'typedef DECIMAL *LPDECIMAL;
#IF NOT %DEF(%DECIMAL_DEFINED)
 %DECIMAL_DEFINED = 1
' // Size = 16 bytes
TYPE DECIMAL ' Must be 8 byte aligned
 wReserved AS WORD
 scale AS BYTE ' // The number of decimal places for the number.
 ' // Valid values are from 0 to 28. So 12.345 is represented
 ' // as 12345 with a scale of 3.
 sign AS BYTE ' // 0 for positive numbers or %DECIMAL_NEG (&H80) for
 ' // negative numbers. So -1 is represented as
 ' // 1 with the %DECIMAL_NEG bit set.
 Hi32 AS DWORD ' // The high 32 bits of your number
 Lo64 AS QUAD ' // The low 64 bits of your number. This is an _int64 (QUAD in PB)
END TYPE
%DECIMAL_NEG = &H80?
#ENDIF
'#if ( _MSC_VER >= 800 )
'#if _MSC_VER >= 1200
'#pragma warning(pop)
'#else
'#pragma warning(default:4201)
'#endif
'#endif
'typedef /* [unique] */ __RPC_unique_pointer FLAGGED_WORD_BLOB *wireBSTR;
'typedef /* [wire_marshal] */ OLECHAR *BSTR;
'typedef BSTR *LPBSTR;
'/* 0 == FALSE, -1 == TRUE */
'typedef short VARIANT_BOOL;
%VARIANT_TRUE = -1%
%VARIANT_FALSE = 0%
'#if !__STDC__ && (_MSC_VER <= 1000)
'/* For backward compatibility */
'typedef VARIANT_BOOL _VARIANT_BOOL;
'#else
'/* ANSI C/C++ reserve bool as keyword */
'#define _VARIANT_BOOL /##/
'#endif
'typedef boolean BOOLEAN;
'/* The BSTRBLOB structure is used by some implementations */
'/* of the IPropertyStorage interface when marshaling BSTRs */
'/* on systems which don't support BSTR marshaling. */
'#ifndef _tagBSTRBLOB_DEFINED
'#define _tagBSTRBLOB_DEFINED
'typedef struct tagBSTRBLOB
' {
' ULONG cbSize;
' BYTE *pData;
' } BSTRBLOB;
'typedef struct tagBSTRBLOB *LPBSTRBLOB;
#IF NOT %DEF(%BSTRBLOB_DEFINED)
%BSTRBLOB_DEFINED = 1
' // Size = 8 bytes
TYPE BSTRBLOB DWORD
 cbSize AS DWORD ' ULONG cbSize
 pData AS BYTE PTR ' /* [size_is] */ BYTE *pData
END TYPE
#ENDIF
'#endif
'#define VARIANT_TRUE ((VARIANT_BOOL)-1)
'#define VARIANT_FALSE ((VARIANT_BOOL)0)
'#ifndef _tagBLOB_DEFINED
'#define _tagBLOB_DEFINED
'#define _BLOB_DEFINED
'#define _LPBLOB_DEFINED
'typedef struct tagBLOB
' {
' ULONG cbSize;
' BYTE *pBlobData;
' } BLOB;
'typedef struct tagBLOB *LPBLOB;
#IF NOT %DEF(%BLOB_DEFINED)
%BLOB_DEFINED = 1
' // Size = 8 bytes
TYPE BLOB DWORD
 cbSize AS DWORD
 pBlobData AS BYTE PTR
END TYPE
#ENDIF
'#endif
'typedef struct tagCLIPDATA
' {
' ULONG cbSize;
' long ulClipFmt;
' BYTE *pClipData;
' } CLIPDATA;
' // Size = 12 bytes
TYPE CLIPDATA DWORD
 cbSize AS DWORD ' ULONG cbSize
 ulClipFmt AS LONG ' long ulClipFmt
 pClipData AS BYTE PTR ' /* [size_is] */ BYTE *pClipData
END TYPE
'// Macro to calculate the size of the above pClipData
'#define CBPCLIPDATA(clipdata) ( (clipdata).cbSize - sizeof((clipdata).ulClipFmt) )
'typedef unsigned short VARTYPE;
'/*
' * VARENUM usage key,
' *
' * * [V] - may appear in a VARIANT
' * * [T] - may appear in a TYPEDESC
' * * [P] - may appear in an OLE property set
' * * [S] - may appear in a Safe Array
' *
' *
' * VT_EMPTY [V] [P] nothing
' * VT_NULL [V] [P] SQL style Null
' * VT_I2 [V][T][P][S] 2 byte signed int
' * VT_I4 [V][T][P][S] 4 byte signed int
' * VT_R4 [V][T][P][S] 4 byte real
' * VT_R8 [V][T][P][S] 8 byte real
' * VT_CY [V][T][P][S] currency
' * VT_DATE [V][T][P][S] date
' * VT_BSTR [V][T][P][S] OLE Automation string
' * VT_DISPATCH [V][T] [S] IDispatch *
' * VT_ERROR [V][T][P][S] SCODE
' * VT_BOOL [V][T][P][S] True=-1, False=0
' * VT_VARIANT [V][T][P][S] VARIANT *
' * VT_UNKNOWN [V][T] [S] IUnknown *
' * VT_DECIMAL [V][T] [S] 16 byte fixed point
' * VT_RECORD [V] [P][S] user defined type
' * VT_I1 [V][T][P][s] signed char
' * VT_UI1 [V][T][P][S] unsigned char
' * VT_UI2 [V][T][P][S] unsigned short
' * VT_UI4 [V][T][P][S] unsigned long
' * VT_I8 [T][P] signed 64-bit int
' * VT_UI8 [T][P] unsigned 64-bit int
' * VT_INT [V][T][P][S] signed machine int
' * VT_UINT [V][T] [S] unsigned machine int
' * VT_INT_PTR [T] signed machine register size width
' * VT_UINT_PTR [T] unsigned machine register size width
' * VT_VOID [T] C style void
' * VT_HRESULT [T] Standard return type
' * VT_PTR [T] pointer type
' * VT_SAFEARRAY [T] (use VT_ARRAY in VARIANT)
' * VT_CARRAY [T] C style array
' * VT_USERDEFINED [T] user defined type
' * VT_LPSTR [T][P] null terminated string
' * VT_LPWSTR [T][P] wide null terminated string
' * VT_FILETIME [P] FILETIME
' * VT_BLOB [P] Length prefixed bytes
' * VT_STREAM [P] Name of the stream follows
' * VT_STORAGE [P] Name of the storage follows
' * VT_STREAMED_OBJECT [P] Stream contains an object
' * VT_STORED_OBJECT [P] Storage contains an object
' * VT_VERSIONED_STREAM [P] Stream with a GUID version
' * VT_BLOB_OBJECT [P] Blob contains an object
' * VT_CF [P] Clipboard format
' * VT_CLSID [P] A Class ID
' * VT_VECTOR [P] simple counted array
' * VT_ARRAY [V] SAFEARRAY*
' * VT_BYREF [V] void* for local use
' * VT_BSTR_BLOB Reserved for system use
' */
'enum VARENUM
' { VT_EMPTY = 0,
' VT_NULL = 1,
' VT_I2 = 2,
' VT_I4 = 3,
' VT_R4 = 4,
' VT_R8 = 5,
' VT_CY = 6,
' VT_DATE = 7,
' VT_BSTR = 8,
' VT_DISPATCH = 9,
' VT_ERROR = 10,
' VT_BOOL = 11,
%VT_BOOL = 11
%VT_EMPTY = 0
%VT_NULL = 1
%VT_I2 = 2
%VT_I4 = 3
%VT_R4 = 4
%VT_R8 = 5
%VT_CY = 6
%VT_DATE = 7
%VT_BSTR = 8
%VT_DISPATCH = 9
%VT_ERROR = 10
%VT_VARIANT = 12
%VT_UNKNOWN = 13
%VT_DECIMAL = 14
%VT_I1 = 16
%VT_UI1 = 17
%VT_UI2 = 18
%VT_UI4 = 19
%VT_I8 = 20
%VT_UI8 = 21
%VT_INT = 22
%VT_UINT = 23
%VT_VOID = 24
%VT_HRESULT = 25
%VT_PTR = 26
%VT_SAFEARRAY = 27
%VT_CARRAY = 28
%VT_USERDEFINED = 29
%VT_LPSTR = 30
%VT_LPWSTR = 31
%VT_RECORD = 36
%VT_INT_PTR = 37
%VT_UINT_PTR = 38
%VT_FILETIME = 64
%VT_BLOB = 65
%VT_STREAM = 66
%VT_STORAGE = 67
%VT_STREAMED_OBJECT = 68
%VT_STORED_OBJECT = 69
%VT_BLOB_OBJECT = 70
%VT_CF = 71
%VT_CLSID = 72
%VT_VERSIONED_STREAM = 73
%VT_BSTR_BLOB = &HFFF
%VT_VECTOR = &H1000
%VT_ARRAY = &H2000
%VT_BYREF = &H4000
%VT_RESERVED = &H8000
%VT_ILLEGAL = &HFFFF
%VT_ILLEGALMASKED = &HFFF
%VT_TYPEMASK = &HFFF
' VT_VARIANT = 12,
' VT_UNKNOWN = 13,
' VT_DECIMAL = 14,
' VT_I1 = 16,
' VT_UI1 = 17,
' VT_UI2 = 18,
' VT_UI4 = 19,
' VT_I8 = 20,
' VT_UI8 = 21,
' VT_INT = 22,
' VT_UINT = 23,
' VT_VOID = 24,
' VT_HRESULT = 25,
' VT_PTR = 26,
' VT_SAFEARRAY = 27,
' VT_CARRAY = 28,
' VT_USERDEFINED = 29,
' VT_LPSTR = 30,
' VT_LPWSTR = 31,
' VT_RECORD = 36,
' VT_INT_PTR = 37,
' VT_UINT_PTR = 38,
' VT_FILETIME = 64,
' VT_BLOB = 65,
' VT_STREAM = 66,
' VT_STORAGE = 67,
' VT_STREAMED_OBJECT = 68,
' VT_STORED_OBJECT = 69,
' VT_BLOB_OBJECT = 70,
' VT_CF = 71,
' VT_CLSID = 72,
' VT_VERSIONED_STREAM = 73,
' VT_BSTR_BLOB = 0xfff,
' VT_VECTOR = 0x1000,
' VT_ARRAY = 0x2000,
' VT_BYREF = 0x4000,
' VT_RESERVED = 0x8000,
' VT_ILLEGAL = 0xffff,
' VT_ILLEGALMASKED = 0xfff,
' VT_TYPEMASK = 0xfff
' } ;
'typedef ULONG PROPID;
'%VT_EMPTY = 0??
'%VT_NULL = 1??
'%VT_I2 = 2??
'%VT_I4 = 3??
'%VT_R4 = 4??
'%VT_R8 = 5??
'%VT_CY = 6??
'%VT_DATE = 7??
'%VT_BSTR = 8??
'%VT_DISPATCH = 9??
'%VT_ERROR = 10??
'%VT_BOOL = 11??
'%VT_VARIANT = 12??
'%VT_UNKNOWN = 13??
'%VT_DECIMAL = 14??
'%VT_I1 = 16??
'%VT_UI1 = 17??
'%VT_UI2 = 18??
'%VT_UI4 = 19??
'%VT_I8 = 20??
'%VT_UI8 = 21??
'%VT_INT = 22??
'%VT_UINT = 23??
'%VT_VOID = 24??
'%VT_HRESULT = 25??
'%VT_PTR = 26??
'%VT_SAFEARRAY = 27??
'%VT_CARRAY = 28??
'%VT_USERDEFINED = 29??
'%VT_LPSTR = 30??
'%VT_LPWSTR = 31??
'%VT_RECORD = 36??
%VT_INT_PTR = 37??
%VT_UINT_PTR = 38??
'%VT_FILETIME = 64??
'%VT_BLOB = 65??
'%VT_STREAM = 66??
'%VT_STORAGE = 67??
'%VT_STREAMED_OBJECT = 68??
'%VT_STORED_OBJECT = 69??
'%VT_BLOB_OBJECT = 70??
'%VT_CF = 71??
'%VT_CLSID = 72??
%VT_VERSIONED_STREAM = 73??
%VT_BSTR_BLOB = &Hfff??
'%VT_VECTOR = &H1000??
'%VT_ARRAY = &H2000??
'%VT_BYREF = &H4000??
%VT_RESERVED = &H8000??
%VT_ILLEGAL = &Hffff??
%VT_ILLEGALMASKED = &Hfff??
%VT_TYPEMASK = &Hfff??
' Note: The following equates are for VBer's that are used to vbxxx constants.
%vbFalse = 0
%vbTrue = -1
%vbEmpty = 0?? ' &H0 (VT_EMPTY)
%vbNull = 1?? ' &H1 (VT_NULL)
%vbInteger = 2?? ' &H2 (VT_UI2)
%vbLong = 3?? ' &H3 (VT_I4)
%vbSingle = 4?? ' &H4 (VT_R4)
%vbDouble = 5?? ' &H5 (VT_R8)
%vbCurrency = 6?? ' &H6 (VT_CY)
%vbDate = 7?? ' &H7 (VT_DATE)
%vbString = 8?? ' &H8 (VT_BSTR)
%vbObject = 9?? ' &H9 (VT_DISPATCH)
%vbError = 10?? ' &HA (VT_ERROR)
%vbBoolean = 11?? ' &HB (VT_BOOL)
%vbVariant = 12?? ' &HC (VT_VARIANT)
%vbDataObject = 13?? ' &HD (VT_UNKNOWN)
%vbDecimal = 14?? ' &HE (VT_DECIMAL)
%vbByte = 17?? ' &H11 (VT_UI1)
%vbWord = 18?? ' &H12 (VT_UI2)
%vbDWord = 19?? ' &H13 (VT_UI4)
%vbQuad = 20?? ' &H14 (VT_I8)
%vbUserDefinedType = 36?? ' &H24 (VT_RECORD)
%vbClsid = 72?? ' &H48 (VT_CLSID)
%vbArray = 8192?? ' &H2000 (VT_ARRAY)
'#ifndef PROPERTYKEY_DEFINED
'#define PROPERTYKEY_DEFINED
'typedef struct _tagpropertykey
' {
' GUID fmtid;
' DWORD pid;
' } PROPERTYKEY;
#IF NOT %DEF(%PROPERTYKEY_DEFINED)
%PROPERTYKEY_DEFINED = 1
' // Size = 20 bytes
TYPE PROPERTYKEY DWORD
 fmtid AS GUID
 pid AS DWORD
END TYPE
#ENDIF
'#endif
'typedef struct _SID_AND_ATTRIBUTES
' {
' SID *Sid;
' DWORD Attributes;
' } SID_AND_ATTRIBUTES;
'typedef struct _SID_AND_ATTRIBUTES *PSID_AND_ATTRIBUTES;
#IF NOT %DEF(%SID_AND_ATTRIBUTES_DEFINED)
%SID_AND_ATTRIBUTES_DEFINED = 1
' // For compatibility with the OB declares
UNION SID_AND_ATTRIBUTES_SID_UNION
 Sid AS SID PTR
 pSid AS SID PTR
END UNION
' // Size = 8 bytes
TYPE SID_AND_ATTRIBUTES DWORD
 SID_AND_ATTRIBUTES_SID_UNION
 Attributes AS DWORD
END TYPE
#ENDIF
'#endif
'typedef struct tagCSPLATFORM
' {
' DWORD dwPlatformId;
' DWORD dwVersionHi;
' DWORD dwVersionLo;
' DWORD dwProcessorArch;
' } CSPLATFORM;
' // Size = 16 bytes
TYPE CSPLATFORM DWORD
 dwPlatformId AS DWORD
 dwVersionHi AS DWORD
 dwVersionLo AS DWORD
 dwProcessorArch AS DWORD
END TYPE
'typedef struct tagQUERYCONTEXT
' {
' DWORD dwContext;
' CSPLATFORM Platform;
' LCID Locale;
' DWORD dwVersionHi;
' DWORD dwVersionLo;
' } QUERYCONTEXT;
' // Size = 32 bytes
TYPE QUERYCONTEXT DWORD
 dwContext AS DWORD
 Platform AS CSPLATFORM ' CSPLATFORM
 Locale AS DWORD ' LCID
 dwVersionHi AS DWORD
 dwVersionLo AS DWORD
END TYPE
'typedef /* [v1_enum] */
'enum tagTYSPEC
' { TYSPEC_CLSID = 0,
' TYSPEC_FILEEXT = ( TYSPEC_CLSID + 1 ) ,
' TYSPEC_MIMETYPE = ( TYSPEC_FILEEXT + 1 ) ,
' TYSPEC_FILENAME = ( TYSPEC_MIMETYPE + 1 ) ,
' TYSPEC_PROGID = ( TYSPEC_FILENAME + 1 ) ,
' TYSPEC_PACKAGENAME = ( TYSPEC_PROGID + 1 ) ,
' TYSPEC_OBJECTID = ( TYSPEC_PACKAGENAME + 1 )
' } TYSPEC;
%TYSPEC_CLSID = 0
%TYSPEC_FILEEXT = %TYSPEC_CLSID + 1
%TYSPEC_MIMETYPE = %TYSPEC_FILEEXT + 1
%TYSPEC_FILENAME = %TYSPEC_MIMETYPE + 1
%TYSPEC_PROGID = %TYSPEC_FILENAME + 1
%TYSPEC_PACKAGENAME = %TYSPEC_PROGID + 1
%TYSPEC_OBJECTID = %TYSPEC_PACKAGENAME + 1
'typedef /* [public] */ struct __MIDL___MIDL_itf_wtypes_0000_0001_0001
' {
' DWORD tyspec;
' /* [switch_type] */ union __MIDL___MIDL_itf_wtypes_0000_0001_0005
' {
' CLSID clsid;
' LPOLESTR pFileExt;
' LPOLESTR pMimeType;
' LPOLESTR pProgId;
' LPOLESTR pFileName;
' struct
' {
' LPOLESTR pPackageName;
' GUID PolicyId;
' } ByName;
' struct
' {
' GUID ObjectId;
' GUID PolicyId;
' } ByObjectId;
' } tagged_union;
' } uCLSSPEC;
' // Size = 20 bytes
TYPE uCLSSPEC_ByName DWORD
 pPackageName AS WSTRINGZ PTR
 PolicyId AS GUID ' GUID
END TYPE
' // Size = 32 bytes
TYPE uCLSSPEC_ByObjectId DWORD
 ObjectId AS GUID ' GUID
 PolicyId AS GUID ' GUID
END TYPE
' // Size = 32 bytes
UNION uCLSSPEC_tagged_union DWORD
 clsid AS GUID ' CLSID
 pFileExt AS WSTRINGZ PTR
 pMimeType AS WSTRINGZ PTR
 pProgId AS WSTRINGZ PTR
 pFileName AS WSTRINGZ PTR
 ByName AS uCLSSPEC_ByName
 ByObjectId AS uCLSSPEC_ByObjectId
END UNION
' // Size = 36 bytes
TYPE uCLSSPEC DWORD
 tyspec AS DWORD
 uCLSSPEC_tagged_union
END TYPE
'extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0001_v0_0_c_ifspec;
'extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0001_v0_0_s_ifspec;
'/* Additional Prototypes for ALL interfaces */
'/* end of Additional Prototypes */
'#ifdef __cplusplus
'}
'#endif
'#endif
' ########################################################################################
' Additional types not defined in the Windows SDK
' ########################################################################################
#IF NOT %DEF(%POINTF_DEFINED)
%POINTF_DEFINED = 1
' // Size = 8 bytes
TYPE PointF DWORD
 x AS SINGLE
 y AS SINGLE
END TYPE
#ENDIF
' // GDI+ and DirectX use Width and Height as members instead of cx, cy
#IF NOT %DEF(%SIZEF_DEFINED)
%SIZEF_DEFINED = 1
' // Size = 8 bytes
TYPE SIZEFLOAT_STRUCT_I DWORD
 cx AS SINGLE
 cy AS SINGLE
END TYPE
' // Size = 8 bytes
TYPE SIZEFLOAT_STRUCT_II DWORD
 Width AS SINGLE
 Height AS SINGLE
END TYPE
' // Size = 8 bytes
UNION SizeF DWORD
 SIZEFLOAT_STRUCT_I
 SIZEFLOAT_STRUCT_II
END UNION
#ENDIF
' // GDI+ and DirectX use x, y, Width and Height as members instead of Left, Right, Top and Bottom
#IF NOT %DEF(%RECTF_DEFINED)
%RECTF_DEFINED = 1
' // Size = 16 bytes
TYPE RECTFLOAT_STRUCT_0 DWORD
 nLeft AS SINGLE ' SINGLE left
 nTop AS SINGLE ' SINGLE top
 nRight AS SINGLE ' SINGLE right
 nBottom AS SINGLE ' SINGLE bottom
END TYPE
TYPE RECTFLOAT_STRUCT_I DWORD
 Left AS SINGLE ' SINGLE left
 Top AS SINGLE ' SINGLE top
 Right AS SINGLE ' SINGLE right
 Bottom AS SINGLE ' SINGLE bottom
END TYPE
' // Size = 16 bytes
TYPE RECTFLOAT_STRUCT_II DWORD
 x AS SINGLE ' SINGLE x
 y AS SINGLE ' SINGLE y
 Width AS SINGLE ' SINGLE Width
 Height AS SINGLE ' SINGLE Height
END TYPE
UNION RectF DWORD
 RECTFLOAT_STRUCT_0
 RECTFLOAT_STRUCT_I
 RECTFLOAT_STRUCT_II
END UNION
#ENDIF
' ########################################################################################
