📄 wtypes.idl
字号:
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright 1992 - 1998 Microsoft Corporation.
//
// File: wtypes.idl
//
// Contents: This interface definition contains typedefs for remotable
// data types.
//
// History: 09-May-96 MikeHill Updated VARENUM comments.
// 22-May-96 MikeHill Added FMTID defintions/macros.
// 06-Jun-96 MikeHill Added CBPCLIPDATA macro.
//
//--------------------------------------------------------------------------
cpp_quote("//+-------------------------------------------------------------------------")
cpp_quote("//")
cpp_quote("// Microsoft Windows")
cpp_quote("// Copyright 1992 - 1998 Microsoft Corporation.")
cpp_quote("//")
cpp_quote("//--------------------------------------------------------------------------")
[ uuid(D3980A60-910C-1068-9341-00DD010F2F1C),
version(0.1), pointer_default(unique) ]
interface IWinTypes
{
typedef struct tagRemHGLOBAL
{
long fNullHGlobal;
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHGLOBAL;
typedef struct tagRemHMETAFILEPICT
{
long mm;
long xExt;
long yExt;
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHMETAFILEPICT;
typedef struct tagRemHENHMETAFILE
{
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHENHMETAFILE;
typedef struct tagRemHBITMAP
{
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHBITMAP;
typedef struct tagRemHPALETTE
{
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHPALETTE;
typedef struct tagRemBRUSH
{
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHBRUSH;
cpp_quote("#if !defined(_WIN32) && !defined(_MPPC_)" )
cpp_quote("// The following code is for Win16 only")
cpp_quote("#ifndef WINAPI // If not included with 3.1 headers...")
cpp_quote("#define FAR _far")
cpp_quote("#define PASCAL _pascal")
cpp_quote("#define CDECL _cdecl")
cpp_quote("#define VOID void")
cpp_quote("#define WINAPI FAR PASCAL")
cpp_quote("#define CALLBACK FAR PASCAL")
cpp_quote("#ifndef FALSE")
cpp_quote("#define FALSE 0")
cpp_quote("#define TRUE 1")
cpp_quote("#endif // !FALSE")
cpp_quote("#ifndef _BYTE_DEFINED")
cpp_quote("#define _BYTE_DEFINED")
typedef unsigned char BYTE;
cpp_quote("#endif // !_BYTE_DEFINED")
cpp_quote("#ifndef _WORD_DEFINED")
cpp_quote("#define _WORD_DEFINED")
typedef unsigned short WORD;
cpp_quote("#endif // !_WORD_DEFINED")
typedef unsigned int UINT;
typedef int INT;
typedef long BOOL;
cpp_quote("#ifndef _LONG_DEFINED")
cpp_quote("#define _LONG_DEFINED")
typedef long LONG;
cpp_quote("#endif // !_LONG_DEFINED")
cpp_quote("#ifndef _WPARAM_DEFINED")
cpp_quote("#define _WPARAM_DEFINED")
typedef UINT WPARAM;
cpp_quote("#endif // _WPARAM_DEFINED")
cpp_quote("#ifndef _DWORD_DEFINED")
cpp_quote("#define _DWORD_DEFINED")
typedef unsigned long DWORD;
cpp_quote("#endif // !_DWORD_DEFINED")
cpp_quote("#ifndef _LPARAM_DEFINED")
cpp_quote("#define _LPARAM_DEFINED")
typedef LONG LPARAM;// this should be a discriminated union.
cpp_quote("#endif // !_LPARAM_DEFINED")
cpp_quote("#ifndef _LRESULT_DEFINED")
cpp_quote("#define _LRESULT_DEFINED")
typedef LONG LRESULT;
cpp_quote("#endif // !_LRESULT_DEFINED")
typedef void * HANDLE;
#define DECLARE_WIREM_HANDLE(name) \
typedef [wire_marshal(wire ## name)] void * name
#define DECLARE_HANDLE(name) typedef void * name
DECLARE_HANDLE(HMODULE);
DECLARE_HANDLE(HINSTANCE);
DECLARE_HANDLE(HRGN);
DECLARE_HANDLE(HTASK);
DECLARE_HANDLE(HKEY);
DECLARE_HANDLE(HDESK);
DECLARE_HANDLE(HMF);
DECLARE_HANDLE(HEMF);
DECLARE_HANDLE(HPEN);
DECLARE_HANDLE(HRSRC);
DECLARE_HANDLE(HSTR);
DECLARE_HANDLE(HWINSTA);
DECLARE_HANDLE(HKL);
DECLARE_HANDLE(HGDIOBJ);
typedef HANDLE HDWP;
cpp_quote("#ifndef _HFILE_DEFINED")
cpp_quote("#define _HFILE_DEFINED")
typedef INT HFILE; /* Polymorphic with C runtime file handle type */
cpp_quote("#endif // !_HFILE_DEFINED")
cpp_quote("#ifndef _LPWORD_DEFINED")
cpp_quote("#define _LPWORD_DEFINED")
typedef WORD *LPWORD;
cpp_quote("#endif // !_LPWORD_DEFINED")
cpp_quote("#ifndef _LPDWORD_DEFINED")
cpp_quote("#define _LPDWORD_DEFINED")
typedef DWORD *LPDWORD;
cpp_quote("#endif // !_LPDWORD_DEFINED")
typedef char CHAR;
typedef [string] CHAR *LPSTR;
typedef [string] const CHAR *LPCSTR;
cpp_quote("#ifndef _WCHAR_DEFINED")
cpp_quote("#define _WCHAR_DEFINED")
typedef wchar_t WCHAR;
typedef WCHAR TCHAR;
cpp_quote("#endif // !_WCHAR_DEFINED")
typedef [string] WCHAR *LPWSTR;
typedef [string] TCHAR *LPTSTR;
typedef [string] const WCHAR *LPCWSTR;
typedef [string] const TCHAR *LPCTSTR;
typedef struct tagPALETTEENTRY {
BYTE peRed;
BYTE peGreen;
BYTE peBlue;
BYTE peFlags;
} PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
// Logical Palette
cpp_quote("#if 0")
typedef struct tagLOGPALETTE {
WORD palVersion;
WORD palNumEntries;
[size_is(palNumEntries)] PALETTEENTRY palPalEntry[];
} LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
cpp_quote("#else")
cpp_quote("typedef struct tagLOGPALETTE {")
cpp_quote(" WORD palVersion;")
cpp_quote(" WORD palNumEntries;")
cpp_quote(" PALETTEENTRY palPalEntry[1];")
cpp_quote("} LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;")
cpp_quote("#endif")
cpp_quote("#ifndef _COLORREF_DEFINED")
cpp_quote("#define _COLORREF_DEFINED")
typedef DWORD COLORREF;
cpp_quote("#endif // !_COLORREF_DEFINED")
cpp_quote("#ifndef _LPCOLORREF_DEFINED")
cpp_quote("#define _LPCOLORREF_DEFINED")
typedef DWORD *LPCOLORREF;
cpp_quote("#endif // !_LPCOLORREF_DEFINED")
typedef HANDLE *LPHANDLE;
//typedefs for remotable types from wingdi.h
typedef struct _RECTL
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECTL, *PRECTL, *LPRECTL;
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, *LPPOINT;
typedef struct _POINTL
{
LONG x;
LONG y;
} POINTL, *PPOINTL;
cpp_quote("#ifndef WIN16")
typedef struct tagSIZE
{
LONG cx;
LONG cy;
} SIZE, *PSIZE, *LPSIZE;
cpp_quote("#else // WIN16")
cpp_quote("typedef struct tagSIZE")
cpp_quote("{")
cpp_quote(" INT cx;")
cpp_quote(" INT cy;")
cpp_quote("} SIZE, *PSIZE, *LPSIZE;")
cpp_quote("#endif // WIN16")
typedef struct tagSIZEL
{
LONG cx;
LONG cy;
} SIZEL, *PSIZEL, *LPSIZEL;
cpp_quote("#endif //WINAPI")
cpp_quote("#endif //!WIN32 && !MPPC")
cpp_quote("#if defined(_WIN32) && !defined(OLE2ANSI)")
typedef WCHAR OLECHAR;
typedef [string] OLECHAR *LPOLESTR;
typedef [string] const OLECHAR *LPCOLESTR;
cpp_quote("#define OLESTR(str) L##str")
cpp_quote("")
cpp_quote("#else")
cpp_quote("")
cpp_quote("typedef char OLECHAR;")
cpp_quote("typedef LPSTR LPOLESTR;")
cpp_quote("typedef LPCSTR LPCOLESTR;")
cpp_quote("#define OLESTR(str) str")
cpp_quote("#endif")
// This block contains types that are normally defined by the nt sdk in WINDEF.H
// but we need them here for definitions that follow in this file. If WINDEF.H
// hasn't been included then we need to define them now so that WTYPES.H
// will compile.
cpp_quote("#ifndef _WINDEF_")
typedef const RECTL *LPCRECTL;
typedef void * PVOID, * LPVOID;
typedef float FLOAT;
typedef struct tagRECT
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT, *LPRECT;
typedef const RECT *LPCRECT;
cpp_quote("#endif //_WINDEF_")
typedef unsigned char UCHAR;
typedef short SHORT;
typedef unsigned short USHORT;
typedef DWORD ULONG;
typedef double DOUBLE;
cpp_quote("#ifndef _DWORDLONG_")
typedef unsigned __int64 DWORDLONG;
typedef DWORDLONG *PDWORDLONG;
cpp_quote("#endif // !_DWORDLONG_")
//
// __int64 is only supported by 2.0 and later midl.
// __midl is set by the 2.0 midl and not by 1.0 midl.
//
cpp_quote("#ifndef _ULONGLONG_")
#if (defined(__midl))
typedef __int64 LONGLONG;
typedef unsigned __int64 ULONGLONG;
#else
typedef double LONGLONG;
typedef double ULONGLONG;
#endif
typedef LONGLONG *PLONGLONG;
typedef ULONGLONG *PULONGLONG;
cpp_quote("#endif // _ULONGLONG_")
// just for local wtypes
cpp_quote("#if 0")
typedef struct _LARGE_INTEGER {
LONGLONG QuadPart;
} LARGE_INTEGER;
typedef LARGE_INTEGER *PLARGE_INTEGER;
typedef struct _ULARGE_INTEGER {
ULONGLONG QuadPart;
} ULARGE_INTEGER;
// just for local wtypes
cpp_quote("#endif // 0")
cpp_quote("#ifndef _WINBASE_")
cpp_quote("#ifndef _FILETIME_")
cpp_quote("#define _FILETIME_")
typedef struct _FILETIME
{
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;
cpp_quote("#endif // !_FILETIME")
cpp_quote("#ifndef _SYSTEMTIME_")
cpp_quote("#define _SYSTEMTIME_")
typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
cpp_quote("#endif // !_SYSTEMTIME")
cpp_quote("#ifndef _SECURITY_ATTRIBUTES_")
cpp_quote("#define _SECURITY_ATTRIBUTES_")
typedef struct _SECURITY_ATTRIBUTES {
DWORD nLength;
[size_is(nLength)] LPVOID lpSecurityDescriptor;
BOOL bInheritHandle;
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
cpp_quote("#endif // !_SECURITY_ATTRIBUTES_")
cpp_quote("#ifndef SECURITY_DESCRIPTOR_REVISION")
typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
typedef PVOID PSID; // winnt
typedef struct _ACL {
UCHAR AclRevision;
UCHAR Sbz1;
USHORT AclSize;
USHORT AceCount;
USHORT Sbz2;
} ACL;
typedef ACL *PACL;
typedef struct _SECURITY_DESCRIPTOR {
UCHAR Revision;
UCHAR Sbz1;
SECURITY_DESCRIPTOR_CONTROL Control;
PSID Owner;
PSID Group;
PACL Sacl;
PACL Dacl;
} SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
cpp_quote("#endif // !SECURITY_DESCRIPTOR_REVISION")
cpp_quote("#endif //_WINBASE_")
typedef struct _COAUTHIDENTITY
{
[size_is(UserLength+1)] USHORT * User;
ULONG UserLength;
[size_is(DomainLength+1)] USHORT * Domain;
ULONG DomainLength;
[size_is(PasswordLength+1)] 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;
//
// SCODE, HRESULT
//
//
// Status values are 32 bit values layed out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +-+-----------------------------+-------------------------------+
// |S| Facility | Code |
// +-+-----------------------------+-------------------------------+
//
// where
//
// S - is the severity code
//
// 0 - Success
// 1 - Error
//
//
// Facility - is the facility code
//
// Code - is the facility's status code
//
// SCODE and HRESULT are mktyplib base types.
//
typedef LONG SCODE;
cpp_quote("#ifndef _HRESULT_DEFINED")
cpp_quote("#define _HRESULT_DEFINED")
#if defined(_STRICT_HRESULT)
typedef struct _HRESULT_STRUCT {
DWORD Data1;
} HRESULT_STRUCT, *PHRESULT_STRUCT;
typedef PHRESULT_STRUCT HRESULT;
#else // defined(_STRICT_HRESULT)
typedef LONG HRESULT;
#endif // defined(_STRICT_HRESULT)
cpp_quote("#endif // !_HRESULT_DEFINED")
typedef SCODE *PSCODE;
cpp_quote("#ifndef GUID_DEFINED")
cpp_quote("#define GUID_DEFINED")
typedef struct _GUID
{
DWORD Data1;
WORD Data2;
WORD Data3;
BYTE Data4[8];
} GUID;
cpp_quote("#endif // !GUID_DEFINED")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -