📄 wtypes.idl
字号:
BYTE tmPitchAndFamily;
BYTE tmCharSet;
} TEXTMETRICW;
cpp_quote("#endif //0")
cpp_quote("#ifndef _WIN32 // The following code is for Win16 only")
cpp_quote("#ifndef WINAPI // If not included with 3.1 headers...")
// Message structure
typedef struct tagMSG {
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG, *PMSG, *NPMSG, *LPMSG;
cpp_quote("#endif // _WIN32")
cpp_quote("#endif // WINAPI")
typedef [unique] userHBITMAP * wireHBITMAP;
typedef [unique] userHPALETTE * wireHPALETTE;
typedef [unique] userHENHMETAFILE * wireHENHMETAFILE;
typedef [unique] userHMETAFILE * wireHMETAFILE;
typedef [unique] userHMETAFILEPICT* wireHMETAFILEPICT;
cpp_quote("#if 0")
DECLARE_WIREM_HANDLE( HGLOBAL );
typedef HGLOBAL HLOCAL;
DECLARE_WIREM_HANDLE( HBITMAP );
DECLARE_WIREM_HANDLE( HPALETTE );
DECLARE_WIREM_HANDLE( HENHMETAFILE );
DECLARE_WIREM_HANDLE( HMETAFILE );
cpp_quote("#endif //0")
DECLARE_WIREM_HANDLE( HMETAFILEPICT );
}
// #########################################################################
//
cpp_quote("#if ( _MSC_VER >= 800 )")
cpp_quote("#pragma warning(disable:4201)")
cpp_quote("#endif")
typedef double DATE;
/* This is a helper struct for use in handling currency. */
cpp_quote("#ifndef _tagCY_DEFINED")
cpp_quote("#define _tagCY_DEFINED")
cpp_quote("#define _CY_DEFINED")
cpp_quote("#if 0")
cpp_quote("/* the following isn't the real definition of CY, but it is */")
cpp_quote("/* what RPC knows how to remote */")
typedef struct tagCY {
LONGLONG int64;
} CY;
cpp_quote("#else /* 0 */")
cpp_quote("/* real definition that makes the C++ compiler happy */")
cpp_quote("typedef union tagCY {")
cpp_quote(" struct {")
cpp_quote("#ifdef _MAC")
cpp_quote(" long Hi;")
cpp_quote(" long Lo;")
cpp_quote("#else")
cpp_quote(" unsigned long Lo;")
cpp_quote(" long Hi;")
cpp_quote("#endif")
cpp_quote(" };")
cpp_quote(" LONGLONG int64;")
cpp_quote("} CY;")
cpp_quote("#endif /* 0 */")
cpp_quote("#endif /* _tagCY_DEFINED */")
typedef CY *LPCY;
cpp_quote("#if 0 /* _tagDEC_DEFINED */")
cpp_quote("/* The following isn't the real definition of Decimal type, */")
cpp_quote("/* but it is what RPC knows how to remote */")
typedef struct tagDEC {
USHORT wReserved;
BYTE scale;
BYTE sign;
ULONG Hi32;
ULONGLONG Lo64;
} DECIMAL;
cpp_quote("#else /* _tagDEC_DEFINED */")
cpp_quote("/* real definition that makes the C++ compiler happy */")
cpp_quote("typedef struct tagDEC {")
cpp_quote(" USHORT wReserved;")
cpp_quote(" union {")
cpp_quote(" struct {")
cpp_quote(" BYTE scale;")
cpp_quote(" BYTE sign;")
cpp_quote(" };")
cpp_quote(" USHORT signscale;")
cpp_quote(" };")
cpp_quote(" ULONG Hi32;")
cpp_quote(" union {")
cpp_quote(" struct {")
cpp_quote("#ifdef _MAC")
cpp_quote(" ULONG Mid32;")
cpp_quote(" ULONG Lo32;")
cpp_quote("#else")
cpp_quote(" ULONG Lo32;")
cpp_quote(" ULONG Mid32;")
cpp_quote("#endif")
cpp_quote(" };")
cpp_quote(" ULONGLONG Lo64;")
cpp_quote(" };")
cpp_quote("} DECIMAL;")
cpp_quote("#define DECIMAL_NEG ((BYTE)0x80)")
cpp_quote("#define DECIMAL_SETZERO(dec) \\")
cpp_quote(" {(dec).Lo64 = 0; (dec).Hi32 = 0; (dec).signscale = 0;}")
cpp_quote("#endif /* _tagDEC_DEFINED */")
typedef DECIMAL *LPDECIMAL;
cpp_quote("#if ( _MSC_VER >= 800 )")
cpp_quote("#pragma warning(default:4201)")
cpp_quote("#endif")
/* IDL declarations for BSTR how to transmit them */
//
typedef [unique] FLAGGED_WORD_BLOB * wireBSTR;
typedef [wire_marshal( wireBSTR )] OLECHAR * BSTR;
typedef BSTR * LPBSTR;
cpp_quote("/* 0 == FALSE, -1 == TRUE */")
typedef short VARIANT_BOOL;
cpp_quote("#if !__STDC__ && (_MSC_VER <= 1000)")
cpp_quote("/* For backward compatibility */")
typedef VARIANT_BOOL _VARIANT_BOOL;
cpp_quote("#else")
cpp_quote("/* ANSI C/C++ reserve bool as keyword */")
cpp_quote("#define _VARIANT_BOOL /##/")
cpp_quote("#endif")
typedef boolean BOOLEAN;
cpp_quote("/* The BSTRBLOB structure is used by some implementations */")
cpp_quote("/* of the IPropertyStorage interface when marshaling BSTRs */")
cpp_quote("/* on systems which don't support BSTR marshaling. */")
cpp_quote("#ifndef _tagBSTRBLOB_DEFINED")
cpp_quote("#define _tagBSTRBLOB_DEFINED")
typedef struct tagBSTRBLOB
{
ULONG cbSize;
[size_is(cbSize)] BYTE *pData;
} BSTRBLOB, *LPBSTRBLOB;
cpp_quote("#endif")
cpp_quote("#define VARIANT_TRUE ((VARIANT_BOOL)0xffff)")
cpp_quote("#define VARIANT_FALSE ((VARIANT_BOOL)0)")
cpp_quote("#ifndef _tagBLOB_DEFINED")
cpp_quote("#define _tagBLOB_DEFINED")
cpp_quote("#define _BLOB_DEFINED")
cpp_quote("#define _LPBLOB_DEFINED")
typedef struct tagBLOB {
ULONG cbSize;
[size_is(cbSize)]
BYTE *pBlobData;
} BLOB, * LPBLOB;
cpp_quote("#endif")
typedef struct tagCLIPDATA {
ULONG cbSize; // count that includes sizeof(ulClipFmt)
long ulClipFmt; // long to keep alignment
[size_is(cbSize-4)]
BYTE * pClipData; // cbSize-sizeof(ULONG) bytes of data in clipboard format
} CLIPDATA;
cpp_quote("// Macro to calculate the size of the above pClipData")
cpp_quote("#define CBPCLIPDATA(clipdata) ( (clipdata).cbSize - sizeof((clipdata).ulClipFmt) )")
typedef unsigned short VARTYPE;
// #########################################################################
//
// VARTYPE
//
// #########################################################################
cpp_quote("/*")
cpp_quote(" * VARENUM usage key,")
cpp_quote(" *")
cpp_quote(" * * [V] - may appear in a VARIANT")
cpp_quote(" * * [T] - may appear in a TYPEDESC")
cpp_quote(" * * [P] - may appear in an OLE property set")
cpp_quote(" * * [S] - may appear in a Safe Array")
cpp_quote(" *")
cpp_quote(" *")
cpp_quote(" * VT_EMPTY [V] [P] nothing")
cpp_quote(" * VT_NULL [V] [P] SQL style Null")
cpp_quote(" * VT_I2 [V][T][P][S] 2 byte signed int")
cpp_quote(" * VT_I4 [V][T][P][S] 4 byte signed int")
cpp_quote(" * VT_R4 [V][T][P][S] 4 byte real")
cpp_quote(" * VT_R8 [V][T][P][S] 8 byte real")
cpp_quote(" * VT_CY [V][T][P][S] currency")
cpp_quote(" * VT_DATE [V][T][P][S] date")
cpp_quote(" * VT_BSTR [V][T][P][S] OLE Automation string")
cpp_quote(" * VT_DISPATCH [V][T][P][S] IDispatch *")
cpp_quote(" * VT_ERROR [V][T][P][S] SCODE")
cpp_quote(" * VT_BOOL [V][T][P][S] True=-1, False=0")
cpp_quote(" * VT_VARIANT [V][T][P][S] VARIANT *")
cpp_quote(" * VT_UNKNOWN [V][T] [S] IUnknown *")
cpp_quote(" * VT_DECIMAL [V][T] [S] 16 byte fixed point")
cpp_quote(" * VT_RECORD [V] [P][S] user defined type")
cpp_quote(" * VT_I1 [V][T][P][s] signed char")
cpp_quote(" * VT_UI1 [V][T][P][S] unsigned char")
cpp_quote(" * VT_UI2 [V][T][P][S] unsigned short")
cpp_quote(" * VT_UI4 [V][T][P][S] unsigned short")
cpp_quote(" * VT_I8 [T][P] signed 64-bit int")
cpp_quote(" * VT_UI8 [T][P] unsigned 64-bit int")
cpp_quote(" * VT_INT [V][T][P][S] signed machine int")
cpp_quote(" * VT_UINT [V][T] [S] unsigned machine int")
cpp_quote(" * VT_VOID [T] C style void")
cpp_quote(" * VT_HRESULT [T] Standard return type")
cpp_quote(" * VT_PTR [T] pointer type")
cpp_quote(" * VT_SAFEARRAY [T] (use VT_ARRAY in VARIANT)")
cpp_quote(" * VT_CARRAY [T] C style array")
cpp_quote(" * VT_USERDEFINED [T] user defined type")
cpp_quote(" * VT_LPSTR [T][P] null terminated string")
cpp_quote(" * VT_LPWSTR [T][P] wide null terminated string")
cpp_quote(" * VT_FILETIME [P] FILETIME")
cpp_quote(" * VT_BLOB [P] Length prefixed bytes")
cpp_quote(" * VT_STREAM [P] Name of the stream follows")
cpp_quote(" * VT_STORAGE [P] Name of the storage follows")
cpp_quote(" * VT_STREAMED_OBJECT [P] Stream contains an object")
cpp_quote(" * VT_STORED_OBJECT [P] Storage contains an object")
cpp_quote(" * VT_BLOB_OBJECT [P] Blob contains an object ")
cpp_quote(" * VT_CF [P] Clipboard format")
cpp_quote(" * VT_CLSID [P] A Class ID")
cpp_quote(" * VT_VECTOR [P] simple counted array")
cpp_quote(" * VT_ARRAY [V] SAFEARRAY*")
cpp_quote(" * VT_BYREF [V] void* for local use")
cpp_quote(" * VT_BSTR_BLOB Reserved for system use")
cpp_quote(" */")
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_VARIANT = 12,
VT_UNKNOWN = 13,
VT_DECIMAL = 14,
// VBA reserves 15 for future use
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,
// VBA reserves 32-35 for future use
VT_RECORD = 36,
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_BSTR_BLOB = 0x0fff,
VT_VECTOR = 0x1000,
VT_ARRAY = 0x2000,
VT_BYREF = 0x4000,
VT_RESERVED = 0x8000,
VT_ILLEGAL = 0xffff,
VT_ILLEGALMASKED = 0x0fff,
VT_TYPEMASK = 0x0fff
};
// Property stuff
typedef ULONG PROPID;
// Access Control - ntseapi.h
cpp_quote( "#ifndef SID_IDENTIFIER_AUTHORITY_DEFINED" )
cpp_quote( "#define SID_IDENTIFIER_AUTHORITY_DEFINED" )
typedef struct _SID_IDENTIFIER_AUTHORITY {
UCHAR Value[6];
} SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
cpp_quote( "#endif" )
cpp_quote( "#ifndef SID_DEFINED" )
cpp_quote( "#define SID_DEFINED" )
typedef struct _SID {
UCHAR Revision;
UCHAR SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
[size_is(SubAuthorityCount)] ULONG SubAuthority[*];
} SID, *PISID;
cpp_quote( "#endif" )
// Class Store Stuff
typedef GUID APPID;
//
// Platform/Architecture Definition
//
typedef struct tagCSPLATFORM
{
DWORD dwPlatformId; // This is the OS Platform
DWORD dwVersionHi; // Major Version of OS
DWORD dwVersionLo; // Minor Version of OS
DWORD dwProcessorArch; // This is the Processor Architecure
} CSPLATFORM;
//
// Query Context Structure
// This contains a list of attributes used to look up a class implementation
//
typedef struct tagQUERYCONTEXT {
DWORD dwContext; // Execution context
CSPLATFORM Platform; // Client Platform/Architecture
LCID Locale; // Locale ID
DWORD dwVersionHi; // Low Version number
DWORD dwVersionLo; // Hi Version number
} QUERYCONTEXT;
//
// Class Specifier structure
// All means of mapping to a Class ID
// (Union of CLSID, File Extension, ProgId, MimeType, File Ext)
//
typedef [v1_enum] enum tagTYSPEC {
TYSPEC_CLSID,
TYSPEC_FILEEXT,
TYSPEC_MIMETYPE,
TYSPEC_PROGID,
TYSPEC_IID,
TYSPEC_TYPELIB,
TYSPEC_FILENAME,
TYSPEC_JAVACLASS,
TYSPEC_PACKAGENAME
} TYSPEC;
typedef union switch(DWORD tyspec)
{
case TYSPEC_CLSID:
CLSID clsid;
case TYSPEC_IID:
IID iid;
case TYSPEC_TYPELIB:
GUID typelibID;
case TYSPEC_FILEEXT:
LPOLESTR pFileExt;
case TYSPEC_MIMETYPE:
LPOLESTR pMimeType;
case TYSPEC_PROGID:
LPOLESTR pProgId;
case TYSPEC_FILENAME:
LPOLESTR pFileName;
case TYSPEC_JAVACLASS:
LPOLESTR pJavaClassName;
case TYSPEC_PACKAGENAME:
LPOLESTR pPackageName;
} uCLSSPEC;
typedef struct _PUBLISHEDAPPINFO
{
LPOLESTR pwszFileExtension;
LPOLESTR pwszDisplayName;
LPOLESTR pwszPackagePath;
} PUBLISHEDAPPINFO;
typedef [v1_enum] enum tagAPPINFOTYPE
{
APPINFO_PUBLISHED = 1,
APPINFO_SHELLNEW,
APPINFO_INSERTABLE
} APPINFOTYPE;
//
// Package Information consists of one or more
// PACKAGEDETAIL - Info about an implemetation code package
//
//
// Package Flag Values returned in PACKAGEDETAIL
// special activation flags
const DWORD ACTFLG_RunLocally = 1; // install the application locally
const DWORD ACTFLG_RunOnce = 2; // this class is meant to be de-installed
const DWORD ACTFLG_SystemWide = 4; // installed this class system-wide
const DWORD ACTFLG_Published = 8; // this is an assigned package for this user
const DWORD ACTFLG_Assigned = 16; // this is a published package for this user
const DWORD ACTFLG_UserInstall = 32; // this package may be installed via Add/Remove programs
// types of package formats
typedef [v1_enum] enum _CLASSPATHTYPE {
ExeNamePath,
DllNamePath,
TlbNamePath,
CabFilePath,
InfFilePath,
DrwFilePath,
SetupNamePath
} CLASSPATHTYPE;
//
// APPDETAIL structure
//
typedef struct tagAPPDETAIL {
GUID AppID;
DWORD cClasses; // Number of classes in this
[size_is(cClasses)] CLSID *prgClsIdList; // List of CLSIDs
DWORD cTypeLibIds; // Number of TypeLibIDs in this
[size_is(cTypeLibIds)] CLSID *prgTypeLibIdList; // List of TypeLibIDs
DWORD cServers; // Number of Remote Server Names in this
[size_is(cServers)] LPOLESTR *prgServerNames; // List of Server names
} APPDETAIL;
//
// PACKAGEDETAIL structure
// Also contains one or more APPDETAIL
//
typedef struct tagPACKAGEDETAIL {
CLASSPATHTYPE PathType;
LPOLESTR pszPath;
LPOLESTR pszIconPath;
LPOLESTR pszSetupCommand;
DWORD dwActFlags; // flags indicating special instructions
LPOLESTR pszVendor; // Package Vendor
LPOLESTR pszPackageName; // Package Identity
LPOLESTR pszProductName; // Product Identity
DWORD dwContext; // Execution context
CSPLATFORM Platform; // Client Platform
LCID Locale; // Locale Id
DWORD dwVersionHi; // Hi Version number
DWORD dwVersionLo; // Low Version number
ULONGLONG Usn; // Update Sequence Number
DWORD cApps;
[size_is(cApps)] APPDETAIL *pAppDetail;
} PACKAGEDETAIL;
// Package Info Structure
// This contains all relevant attributes of a package that may be of interest
// to COM activation.
//
typedef struct tagPACKAGEINFO {
LPOLESTR pszClassIconPath;
CLSID *pTreatAsClsid;
DWORD cPackages;
[size_is(cPackages)]
PACKAGEDETAIL *pPackageDetail;
} PACKAGEINFO;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -