Windows编程概述
Windows系统是一个消息驱动的操作系统,每一个事件的发生都会产生一个消息,我们通过消息来知道发生了什么事件。
Windows编程是在实现程序算法的基础上进行窗口编程。程序员可以直接调用Windows API进行Windows程序设计,也可以采用使用类库,比如MFC,WTL等进行Windows程序设计。
Win32程序运行原理2-1
Win32程序运行原理2-2
Windows程序是以事件驱动方式运行的,主要是基于消息。操作系统将每个感知的事件都包装成一个称为消息的结构体MSG来传递给应用程序。MSG结构如下示:
typedef struct tagMSG
{
HWND hwnd; //一个消息总是与某个窗体相关联的
UINT message; //消息标识符,数值,对应WM_XXX的宏
WPARAM wParam; //附加消息
LPARAM lParam; //附加消息
DWORD time; //投递时间
POINT pt; //鼠标当前位置
} MSG;
而应用程序则循环不断地从消息队列中取出消息,并进行响应,这就是消息机制。
注意到,操作系统为不同类型的应用程序维护不同的消息队列。消息也分进队和不进队消息,进队的消息由系统放入到应用程序的消息队列中,不进队的消息在系统调用窗口过程时直接发送给窗口。不管是进队还是不进队消息,最终都由系统调用窗口过程函数对消息进行处理
消息队列
一、每个Windows程序都有一个消息队列(Queue )。队列是一个先进先出的缓冲区,通常是一个某种变量类型的数组。
二、队列里的每一个元素就是一条消息,操作系统将生成的每个消息按先后顺序放进消息队列里
三、应用程序总是取走队列里的第一条消息,消息取走后,剩余的消息依次前移。
四、应用程序得到消息后,就要对消息进行处理(消息响应),消息响应是我们通过编码实现的,这也是Windows程序的主要代码区。
消息和消息队列
系统给每一个GUI线程维护一个消息队列,在所有线程产生时并没有消息队列,当线程第一次调用GDI函数时 ,系统给线程创建一个消息队列。线程消息队列接收由这个线程创建的所有窗口的鼠标键盘消息。线程删除队列中消息,系统调用窗口过程进行相应的处理。
Win32编程中的数据类型2-1
Win32编程中的数据类型2-2
一、这些基本数据类型都是以大写字符出现。
二、凡是数据类型的前缀是P或LP,表示该类型是一个指针或长指针数据类型。前缀是H,表示是句柄类型。前缀是U,表示是无符号数据类型
三、使用typedef对现有的数据类型取个别名,希望从变量定义的类型上,就能区分出变量的用途。对于同一种变量类型,可按其用途细分定义成多种其他的形式
句柄(HANDLE)
关于API和SDK
Windows应用程序的基本流程:
Win32程序实现的步骤
WinMain函数2-1
WinMain函数2-2
窗口及生成
WNDCLASS结构体3-1
WNDCLASS结构体3-2
一、style成员指定了这一类型窗口的样式
A、CS_NOCLOSE:这一类型的窗口没有关闭按钮
B、CS_VREDRAW:当改变窗口的垂直方向上的高度时,将引发窗口重画
C、CS_HREDRAW:当改变窗口的水平方向上的宽度时,将引发窗口重画
D、CS_DBLCLKS:设置该值可以接受到用户双击的消息
二、lpfnWndProc指定了这一类型窗口的过程函数,也称回调函数
三、cbClsExtra,cbWndExtra一般都被初始化为0
四、hInstance指定了提供回调函数的程序实例句柄
五、hIcon指定了窗口的图标句柄,使用LoadIcon函数
六、hCursor指定了窗口的光标句柄,LoadCursor函数
七、hbrBackground指定了这一类型窗口重画时所使用的刷子句柄,当窗口重画时会使用这 里指定的刷子去刷新窗口背景。使用GetStockObject返回一个系统刷子,返回类型是HGDIOBJECT(图形设备对象的总称),必须转换成HBRUSH
八、lpszMenuName指定了这一类型窗口的菜单
九、lpszClassName指定了这一类型窗口的名称,是字符串变量
设计窗口类代码
int WINAPI WinMain (HINSTANCEhInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){
HWND hwnd ; // 窗口句柄
WNDCLASS wndclass ; // 窗口类
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = WndProc ;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = 0 ;
wndclass.hInstance = hInstance ;
wndclass.hIcon= LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuName = NULL ;
wndclass.lpszClassName = “HelloWin”; // 窗口类名
//以下代码省略
}
注册窗口类-RegisterClass
一、设计完WNDCLASS后,需调用RegisterClass函数对其进行注册,经过注册之后,才可以创建该窗口
二、函数的原型:
A、ATOMRegisterClass( CONST WNDCLASS *lpWndClass // class data );
B、返回值为0代表注册失败
创建窗口——CreateWindow 2-1
一、设计好了窗口类并且将其注册好以后就可以用CreateWindow函数产生这种类型的窗口了
二、CreateWindow函数原型如下:
HWND CreateWindow(
LPCTSTR lpClassName, //registered class name
LPCTSTR lpWindowName, // window name
DWORD dwStyle, //window style
int x, //horizontal position of window
int y, // vertical position of window
int nWidth, //window width
int nHeight, //window height
HWND hWndParent, //handle to parent
HMENU hMenu, //menu handle or child identifier
HINSTANCE hInstance, //handle to application instance
LPVOID lpParam //window-creation data
);
创建窗口——CreateWindow 2-2
一、lpClassName是WNDCLASS的lpszClassName成员里指定的名称
二、lpWindowName指定产生的窗口实例上显示的标题文字
三、dwStyle指定产生的窗口实例的样式
四、x,y,nWidth,nHeight指定了窗口左上角的x,y坐标,窗口的宽度,高度
五、hWndParent指定了窗口的父窗口句柄
六、hMenu指定了窗口的菜单或子窗口句柄
七、hInstance指定了窗口所属的应用程序的句柄
八、lpParam可以为窗口附加补充信息
九、返回值:窗口创建成功,函数将返回系统为该窗口分配的句柄,否则,返回NULL
显示创建的窗口2-1
一、函数ShowWindow和UpdateWindow分别表示显示和刷新窗口,其函数原形分别如下:
BOOL ShowWindow(
HWND hWnd, // handle to window
int nCmdShow // show state
);
BOOL UpdateWindow(
HWND hWnd // handle to window
);
窗口的注册、创建和显示代码
//WinMain函数——窗口类设计代码省略
if (!RegisterClass (&wndclass)) {// 注册窗口
MessageBox (NULL, "窗口注册失败!", "HelloWin", 0) ;
return 0 ;
}
hwnd = CreateWindow ("HelloWin", // 窗口类名
"我的窗口", //窗口标题
WS_OVERLAPPEDWINDOW, // 窗口样式
CW_USEDEFAULT, //窗口最初的 x 位置
CW_USEDEFAULT, //窗口最初的 y 位置
CW_USEDEFAULT, //窗口最初的 x 大小
CW_USEDEFAULT, //窗口最初的 y 大小
NULL, NULL, // 父窗口句柄 // 窗口菜单句柄
hInstance, // 应用程序实例句柄
NULL) ; // 创建窗口的参数
ShowWindow (hwnd, nCmdShow) ; //显示窗口
UpdateWindow (hwnd) ; //更新窗口,包括窗口的客户区
//以下代码省略
消息循环3-1
一、GetMessage函数从应用程序消息队列中取走一条消息
二、该函数的原型如下:
BOOL GetMessage(
LPMSG lpMsg, //接收消息的变量的指针
HWND hWnd,//接收属于哪个窗口的消息
UINT wMsgFilterMin, //接受某一范围内的消息
UINT wMsgFilterMax //接受某一范围内的消息
);
三、返回值:除了WM_QUIT消息外,该函数返回非零值。对WM_QUIT消息,该函数返回零。
消息循环3-2
一、TranslateMessage函数的作用是对取到的消息进行转换。
A、将可行的WM_KEYDOWN,WM_KEYUP, WM_SYSKEYDOWN WM_SYSKEYUP消息对转换 成一条WM_CHAR消息或WM_SYSCHAR消息,并将转换后得到的新消息投递到程序的 消息队列中。不会影响原来的消息,只在消息队列中增加新消息。
二、DispatchMessage函数将取到的消息传递到窗口的回调函数中去处理。可以理解成该函数通知操作系统,让操作系统去调用窗口的回调函数来处理收到的消息
三、两个函数的参数都是消息变量的指针
消息循环3-3
//WinMain函数
//…以上代码省略
MSG msg;
while (GetMessage (&msg, NULL, 0, 0))
{
TranslateMessage (&msg) ;// 转换某些键盘消息
DispatchMessage (&msg) ;
}
return msg.wParam;
//…以下代码省略
回调函数2-1
一、可以将函数名WindowProc改为我们喜欢的名称,回调函数的原型:
LRESULT CALLBACK WindowProc(
HWND hwnd, //对应消息的窗口句柄
UINT uMsg, //消息码
WPARAM wParam, //第一个消息补充参数
LPARAM lParam //第二个消息补充参数
);
回调函数2-2
LRESULT CALLBACK WndProc (HWNDhwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_LBUTTONDOWN:
MessageBox (NULL,“Hello World”, “问候”, 0) ; return 0 ;
case WM_CHAR:
charmessage[100];
sprintf(message,"your enter char is:%c",wParam);
MessageBox(hwnd,message,"提示",0);
return 0;
}
return DefWindowProc (hwnd, message, wParam, lParam) ;
// 执行默认的消息处理
完整代码显示
/* this ALWAYS GENERATED file contains thedefinitions for the interfaces */
/* File created by MIDL compiler version3.03.0110 */
/* at Thu Sep 11 10:57:03 1997
*/
/* Compiler settings for wtypes.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: none
*/
//@@MIDL_FILE_HEADING( )
/* verify that the
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 440
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __wtypes_h__
#define __wtypes_h__
#ifdef __cplusplus
extern "C"{
#endif
/* Forward Declarations */
void __RPC_FAR * __RPC_USERMIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void__RPC_FAR * );
/****************************************
*Generated header for interface: __MIDL_itf_wtypes_0000
* atThu Sep 11 10:57:03 1997
*using MIDL 3.03.0110
****************************************/
/* [local] */
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright 1992 - 1998 Microsoft Corporation.
//
//--------------------------------------------------------------------------
extern RPC_IF_HANDLE__MIDL_itf_wtypes_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE__MIDL_itf_wtypes_0000_v0_0_s_ifspec;
#ifndef __IWinTypes_INTERFACE_DEFINED__
#define __IWinTypes_INTERFACE_DEFINED__
/****************************************
*Generated header for interface: IWinTypes
* atThu Sep 11 10:57:03 1997
*using MIDL 3.03.0110
****************************************/
/* [auto_handle][unique][version][uuid] */
typedef struct tagRemHGLOBAL
{
long fNullHGlobal;
unsigned long cbData;
/* [size_is] */ byte data[ 1 ];
} RemHGLOBAL;
typedef struct tagRemHMETAFILEPICT
{
long mm;
long xExt;
long yExt;
unsigned long cbData;
/* [size_is] */ byte data[ 1 ];
} RemHMETAFILEPICT;
typedef struct tagRemHENHMETAFILE
{
unsigned long cbData;
/* [size_is] */ byte data[ 1 ];
} RemHENHMETAFILE;
typedef struct tagRemHBITMAP
{
unsigned long cbData;
/* [size_is] */ byte data[ 1 ];
} RemHBITMAP;
typedef struct tagRemHPALETTE
{
unsigned long cbData;
/* [size_is] */ byte data[ 1 ];
} RemHPALETTE;
typedef struct tagRemBRUSH
{
unsigned long cbData;
/* [size_is] */ byte data[ 1 ];
} RemHBRUSH;
#if !defined(_WIN32) &&!defined(_MPPC_)
// The following code is for Win16 only
#ifndef WINAPI // If not included with 3.1headers...
#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 unsigned char 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 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 LPARAM;
#endif // !_LPARAM_DEFINED
#ifndef _LRESULT_DEFINED
#define _LRESULT_DEFINED
typedef LONG LRESULT;
#endif // !_LRESULT_DEFINED
typedef void __RPC_FAR *HANDLE;
typedef void __RPC_FAR *HMODULE;
typedef void __RPC_FAR *HINSTANCE;
typedef void __RPC_FAR *HRGN;
typedef void __RPC_FAR *HTASK;
typedef void __RPC_FAR *HKEY;
typedef void __RPC_FAR *HDESK;
typedef void __RPC_FAR *HMF;
typedef void __RPC_FAR *HEMF;
typedef void __RPC_FAR *HPEN;
typedef void __RPC_FAR *HRSRC;
typedef void __RPC_FAR *HSTR;
typedef void __RPC_FAR *HWINSTA;
typedef void __RPC_FAR *HKL;
typedef void __RPC_FAR *HGDIOBJ;
typedef HANDLE HDWP;
#ifndef _HFILE_DEFINED
#define _HFILE_DEFINED
typedef INT HFILE;
#endif // !_HFILE_DEFINED
#ifndef _LPWORD_DEFINED
#define _LPWORD_DEFINED
typedef WORD __RPC_FAR *LPWORD;
#endif // !_LPWORD_DEFINED
#ifndef _LPDWORD_DEFINED
#define _LPDWORD_DEFINED
typedef DWORD __RPC_FAR *LPDWORD;
#endif // !_LPDWORD_DEFINED
typedef char CHAR;
typedef /* [string] */ CHAR __RPC_FAR*LPSTR;
typedef /* [string] */ const CHAR __RPC_FAR*LPCSTR;
#ifndef _WCHAR_DEFINED
#define _WCHAR_DEFINED
typedef wchar_t WCHAR;
typedef WCHAR TCHAR;
#endif // !_WCHAR_DEFINED
typedef /* [string] */ WCHAR __RPC_FAR*LPWSTR;
typedef /* [string] */ TCHAR __RPC_FAR*LPTSTR;
typedef /* [string] */ const WCHAR__RPC_FAR *LPCWSTR;
typedef /* [string] */ const TCHAR__RPC_FAR *LPCTSTR;
typedef struct tagPALETTEENTRY
{
BYTE peRed;
BYTE peGreen;
BYTE peBlue;
BYTE peFlags;
} PALETTEENTRY;
typedef struct tagPALETTEENTRY __RPC_FAR*PPALETTEENTRY;
typedef struct tagPALETTEENTRY __RPC_FAR*LPPALETTEENTRY;
#if 0
typedef struct tagLOGPALETTE
{
WORD palVersion;
WORD palNumEntries;
/* [size_is] */ PALETTEENTRY palPalEntry[ 1 ];
} LOGPALETTE;
typedef struct tagLOGPALETTE __RPC_FAR*PLOGPALETTE;
typedef struct tagLOGPALETTE __RPC_FAR*LPLOGPALETTE;
#else
typedef struct tagLOGPALETTE {
WORD palVersion;
WORD palNumEntries;
PALETTEENTRY palPalEntry[1];
} LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
#endif
#ifndef _COLORREF_DEFINED
#define _COLORREF_DEFINED
typedef DWORD COLORREF;
#endif // !_COLORREF_DEFINED
#ifndef _LPCOLORREF_DEFINED
#define _LPCOLORREF_DEFINED
typedef DWORD __RPC_FAR *LPCOLORREF;
#endif // !_LPCOLORREF_DEFINED
typedef HANDLE __RPC_FAR *LPHANDLE;
typedef struct _RECTL
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECTL;
typedef struct _RECTL __RPC_FAR *PRECTL;
typedef struct _RECTL __RPC_FAR *LPRECTL;
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT;
typedef struct tagPOINT __RPC_FAR *PPOINT;
typedef struct tagPOINT __RPC_FAR *LPPOINT;
typedef struct _POINTL
{
LONG x;
LONG y;
} POINTL;
typedef struct _POINTL __RPC_FAR *PPOINTL;
#ifndef WIN16
typedef struct tagSIZE
{
LONG cx;
LONG cy;
} SIZE;
typedef struct tagSIZE __RPC_FAR *PSIZE;
typedef struct tagSIZE __RPC_FAR *LPSIZE;
#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 __RPC_FAR *PSIZEL;
typedef struct tagSIZEL __RPC_FAR *LPSIZEL;
#endif //WINAPI
#endif //!WIN32 && !MPPC
#if defined(_WIN32) &&!defined(OLE2ANSI)
typedef WCHAR OLECHAR;
typedef /* [string] */ OLECHAR __RPC_FAR*LPOLESTR;
typedef /* [string] */ const OLECHAR__RPC_FAR *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 __RPC_FAR *LPCRECTL;
typedef void __RPC_FAR *PVOID;
typedef void __RPC_FAR *LPVOID;
typedef float FLOAT;
typedef struct tagRECT
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT;
typedef struct tagRECT __RPC_FAR *PRECT;
typedef struct tagRECT __RPC_FAR *LPRECT;
typedef const RECT __RPC_FAR *LPCRECT;
#endif //_WINDEF_
typedef unsigned char UCHAR;
typedef short SHORT;
typedef unsigned short USHORT;
typedef DWORD ULONG;
typedef double DOUBLE;
#ifndef _DWORDLONG_
typedef MIDL_uhyper DWORDLONG;
typedef DWORDLONG __RPC_FAR *PDWORDLONG;
#endif // !_DWORDLONG_
#ifndef _ULONGLONG_
typedef hyper LONGLONG;
typedef MIDL_uhyper ULONGLONG;
typedef LONGLONG __RPC_FAR *PLONGLONG;
typedef ULONGLONG __RPC_FAR *PULONGLONG;
#endif // _ULONGLONG_
#if 0
typedef struct _LARGE_INTEGER
{
LONGLONG QuadPart;
} LARGE_INTEGER;
typedef LARGE_INTEGER __RPC_FAR*PLARGE_INTEGER;
typedef struct _ULARGE_INTEGER
{
ULONGLONG QuadPart;
} ULARGE_INTEGER;
#endif // 0
#ifndef _WINBASE_
#ifndef _FILETIME_
#define _FILETIME_
typedef struct _FILETIME
{
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME;
typedef struct _FILETIME __RPC_FAR*PFILETIME;
typedef struct _FILETIME __RPC_FAR*LPFILETIME;
#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 __RPC_FAR*PSYSTEMTIME;
typedef struct _SYSTEMTIME __RPC_FAR*LPSYSTEMTIME;
#endif // !_SYSTEMTIME
#ifndef _SECURITY_ATTRIBUTES_
#define _SECURITY_ATTRIBUTES_
typedef struct _SECURITY_ATTRIBUTES
{
DWORD nLength;
/* [size_is] */ LPVOID lpSecurityDescriptor;
BOOL bInheritHandle;
} SECURITY_ATTRIBUTES;
typedef struct _SECURITY_ATTRIBUTES__RPC_FAR *PSECURITY_ATTRIBUTES;
typedef struct _SECURITY_ATTRIBUTES__RPC_FAR *LPSECURITY_ATTRIBUTES;
#endif // !_SECURITY_ATTRIBUTES_
#ifndef SECURITY_DESCRIPTOR_REVISION
typedef USHORT SECURITY_DESCRIPTOR_CONTROL;
typedef USHORT __RPC_FAR*PSECURITY_DESCRIPTOR_CONTROL;
typedef PVOID PSID;
typedef struct _ACL
{
UCHAR AclRevision;
UCHAR Sbz1;
USHORT AclSize;
USHORT AceCount;
USHORT Sbz2;
} ACL;
typedef ACL __RPC_FAR *PACL;
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__RPC_FAR *PISECURITY_DESCRIPTOR;
#endif // !SECURITY_DESCRIPTOR_REVISION
#endif //_WINBASE_
typedef struct _COAUTHIDENTITY
{
/* [size_is] */ USHORT __RPC_FAR *User;
ULONG UserLength;
/* [size_is] */ USHORT __RPC_FAR *Domain;
ULONG DomainLength;
/* [size_is] */ USHORT __RPC_FAR *Password;
ULONG PasswordLength;
ULONG Flags;
} COAUTHIDENTITY;
typedef struct _COAUTHINFO
{
DWORD dwAuthnSvc;
DWORD dwAuthzSvc;
LPWSTR pwszServerPrincName;
DWORD dwAuthnLevel;
DWORD dwImpersonationLevel;
COAUTHIDENTITY __RPC_FAR *pAuthIdentityData;
DWORD dwCapabilities;
} COAUTHINFO;
typedef LONG SCODE;
#ifndef _HRESULT_DEFINED
#define _HRESULT_DEFINED
typedef LONG HRESULT;
#endif // !_HRESULT_DEFINED
typedef SCODE __RPC_FAR *PSCODE;
#ifndef GUID_DEFINED
#define GUID_DEFINED
typedef struct _GUID
{
DWORD Data1;
WORD Data2;
WORD Data3;
BYTE Data4[ 8 ];
} GUID;
#endif // !GUID_DEFINED
#if !defined( __LPGUID_DEFINED__ )
#define __LPGUID_DEFINED__
typedef GUID __RPC_FAR *LPGUID;
#endif // !__LPGUID_DEFINED__
#ifndef __OBJECTID_DEFINED
#define __OBJECTID_DEFINED
#define _OBJECTID_DEFINED
typedef struct _OBJECTID
{
GUID Lineage;
unsigned long Uniquifier;
} OBJECTID;
#endif // !_OBJECTID_DEFINED
#if !defined( __IID_DEFINED__ )
#define __IID_DEFINED__
typedef GUID IID;
typedef IID __RPC_FAR *LPIID;
#define IID_NULL GUID_NULL
#define IsEqualIID(riid1, riid2)IsEqualGUID(riid1, riid2)
typedef GUID CLSID;
typedef CLSID __RPC_FAR *LPCLSID;
#define CLSID_NULL GUID_NULL
#define IsEqualCLSID(rclsid1, rclsid2)IsEqualGUID(rclsid1, rclsid2)
typedef GUID FMTID;
typedef FMTID __RPC_FAR *LPFMTID;
#define FMTID_NULL GUID_NULL
#define IsEqualFMTID(rfmtid1, rfmtid2)IsEqualGUID(rfmtid1, rfmtid2)
#if 0
typedef GUID __RPC_FAR *REFGUID;
typedef IID __RPC_FAR *REFIID;
typedef CLSID __RPC_FAR *REFCLSID;
typedef FMTID __RPC_FAR *REFFMTID;
#endif // 0
#if defined(__cplusplus)
#ifndef _REFGUID_DEFINED
#define _REFGUID_DEFINED
#define REFGUID const GUID &
#endif // !_REFGUID_DEFINED
#ifndef _REFIID_DEFINED
#define _REFIID_DEFINED
#define REFIID const IID &
#endif // !_REFIID_DEFINED
#ifndef _REFCLSID_DEFINED
#define _REFCLSID_DEFINED
#define REFCLSID const CLSID &
#endif // !_REFCLSID_DEFINED
#ifndef _REFFMTID_DEFINED
#define _REFFMTID_DEFINED
#define REFFMTID const FMTID &
#endif // !_REFFMTID_DEFINED
#else // !__cplusplus
#ifndef _REFGUID_DEFINED
#define _REFGUID_DEFINED
#define REFGUID const GUID * const
#endif // !_REFGUID_DEFINED
#ifndef _REFIID_DEFINED
#define _REFIID_DEFINED
#define REFIID const IID * const
#endif // !_REFIID_DEFINED
#ifndef _REFCLSID_DEFINED
#define _REFCLSID_DEFINED
#define REFCLSID const CLSID * const
#endif // !_REFCLSID_DEFINED
#ifndef _REFFMTID_DEFINED
#define _REFFMTID_DEFINED
#define REFFMTID const FMTID * const
#endif // !_REFFMTID_DEFINED
#endif // !__cplusplus
#endif // !__IID_DEFINED__
typedef
enum tagMEMCTX
{ MEMCTX_TASK = 1,
MEMCTX_SHARED = 2,
MEMCTX_MACSYSTEM = 3,
MEMCTX_UNKNOWN = -1,
MEMCTX_SAME = -2
} MEMCTX;
#ifndef _ROTFLAGS_DEFINED
#define _ROTFLAGS_DEFINED
#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1
#define ROTFLAGS_ALLOWANYCLIENT 0x2
#endif // !_ROTFLAGS_DEFINED
#ifndef _ROT_COMPARE_MAX_DEFINED
#define _ROT_COMPARE_MAX_DEFINED
#define ROT_COMPARE_MAX 2048
#endif // !_ROT_COMPARE_MAX_DEFINED
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,
CLSCTX_INPROC_HANDLERX86 = 0x80,
CLSCTX_ESERVER_HANDLER = 0x100
} CLSCTX;
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;
typedef
enum tagDVASPECT
{ DVASPECT_CONTENT = 1,
DVASPECT_THUMBNAIL = 2,
DVASPECT_ICON = 4,
DVASPECT_DOCPRINT = 8
} DVASPECT;
typedef
enum tagSTGC
{ STGC_DEFAULT = 0,
STGC_OVERWRITE = 1,
STGC_ONLYIFCURRENT = 2,
STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
STGC_CONSOLIDATE = 8
} STGC;
typedef
enum tagSTGMOVE
{ STGMOVE_MOVE = 0,
STGMOVE_COPY = 1,
STGMOVE_SHALLOWCOPY = 2
} STGMOVE;
typedef
enum tagSTATFLAG
{ STATFLAG_DEFAULT = 0,
STATFLAG_NONAME = 1,
STATFLAG_NOOPEN = 2
} STATFLAG;
typedef /* [context_handle] */ void__RPC_FAR *HCONTEXT;
#ifndef _LCID_DEFINED
#define _LCID_DEFINED
typedef DWORD LCID;
#endif // !_LCID_DEFINED
typedef struct _BYTE_BLOB
{
unsigned long clSize;
/* [size_is] */ byte abData[ 1 ];
} BYTE_BLOB;
typedef /* [unique] */ BYTE_BLOB __RPC_FAR*UP_BYTE_BLOB;
typedef struct _WORD_BLOB
{
unsigned long clSize;
/* [size_is] */ unsigned short asData[ 1 ];
} WORD_BLOB;
typedef /* [unique] */ WORD_BLOB __RPC_FAR*UP_WORD_BLOB;
typedef struct _DWORD_BLOB
{
unsigned long clSize;
/* [size_is] */ unsigned long alData[ 1 ];
} DWORD_BLOB;
typedef /* [unique] */ DWORD_BLOB __RPC_FAR*UP_DWORD_BLOB;
typedef struct _FLAGGED_BYTE_BLOB
{
unsigned long fFlags;
unsigned long clSize;
/* [size_is] */ byte abData[ 1 ];
} FLAGGED_BYTE_BLOB;
typedef /* [unique] */ FLAGGED_BYTE_BLOB__RPC_FAR *UP_FLAGGED_BYTE_BLOB;
typedef struct _FLAGGED_WORD_BLOB
{
unsigned long fFlags;
unsigned long clSize;
/* [size_is] */ unsigned short asData[ 1 ];
} FLAGGED_WORD_BLOB;
typedef /* [unique] */ FLAGGED_WORD_BLOB__RPC_FAR *UP_FLAGGED_WORD_BLOB;
typedef struct _BYTE_SIZEDARR
{
unsigned long clSize;
/* [size_is] */ byte __RPC_FAR *pData;
} BYTE_SIZEDARR;
typedef struct _SHORT_SIZEDARR
{
unsigned long clSize;
/* [size_is] */ unsigned short __RPC_FAR *pData;
} WORD_SIZEDARR;
typedef struct _LONG_SIZEDARR
{
unsigned long clSize;
/* [size_is] */ unsigned long __RPC_FAR *pData;
} DWORD_SIZEDARR;
typedef struct _HYPER_SIZEDARR
{
unsigned long clSize;
/* [size_is] */ hyper __RPC_FAR *pData;
} HYPER_SIZEDARR;
#define WDT_INPROC_CALL ( 0x48746457 )
#define WDT_REMOTE_CALL ( 0x52746457 )
typedef struct _userCLIPFORMAT
{
long fContext;
/* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0001
{
/* [case()] */ DWORD dwValue;
/* [case()][string] */ wchar_t __RPC_FAR *pwszName;
} u;
} userCLIPFORMAT;
typedef /* [unique] */ userCLIPFORMAT__RPC_FAR *wireCLIPFORMAT;
typedef /* [wire_marshal] */ WORDCLIPFORMAT;
typedef struct _GDI_NONREMOTE
{
long fContext;
/* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0002
{
/* [case()] */ long hInproc;
/* [case()] */ DWORD_BLOB __RPC_FAR *hRemote;
} u;
} GDI_NONREMOTE;
typedef struct _userHGLOBAL
{
long fContext;
/* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0003
{
/* [case()] */ long hInproc;
/* [case()] */ FLAGGED_BYTE_BLOB __RPC_FAR *hRemote;
/* [default] */ long hGlobal;
} u;
} userHGLOBAL;
typedef /* [unique] */ userHGLOBAL__RPC_FAR *wireHGLOBAL;
typedef struct _userHMETAFILE
{
long fContext;
/* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0004
{
/* [case()] */ long hInproc;
/* [case()] */ BYTE_BLOB __RPC_FAR *hRemote;
/* [default] */ long hGlobal;
} u;
} userHMETAFILE;
typedef struct _remoteMETAFILEPICT
{
long mm;
long xExt;
long yExt;
userHMETAFILE __RPC_FAR *hMF;
} remoteMETAFILEPICT;
typedef struct _userHMETAFILEPICT
{
long fContext;
/* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0005
{
/* [case()] */ long hInproc;
/* [case()] */ remoteMETAFILEPICT __RPC_FAR *hRemote;
/* [default] */ long hGlobal;
} u;
} userHMETAFILEPICT;
typedef struct _userHENHMETAFILE
{
long fContext;
/* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0006
{
/* [case()] */ long hInproc;
/* [case()] */ BYTE_BLOB __RPC_FAR *hRemote;
/* [default] */ long hGlobal;
} u;
} userHENHMETAFILE;
typedef struct _userBITMAP
{
LONG bmType;
LONG bmWidth;
LONG bmHeight;
LONG bmWidthBytes;
WORD bmPlanes;
WORD bmBitsPixel;
ULONG cbSize;
/* [size_is] */ byte pBuffer[ 1 ];
} userBITMAP;
typedef struct _userHBITMAP
{
long fContext;
/* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0007
{
/* [case()] */ long hInproc;
/* [case()] */ userBITMAP __RPC_FAR *hRemote;
/* [default] */ long hGlobal;
} u;
} userHBITMAP;
typedef struct tagrpcLOGPALETTE
{
WORD palVersion;
WORD palNumEntries;
/* [size_is] */ PALETTEENTRY palPalEntry[ 1 ];
} rpcLOGPALETTE;
typedef struct _userHPALETTE
{
long fContext;
/* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0008
{
/* [case()] */ long hInproc;
/* [case()] */ rpcLOGPALETTE __RPC_FAR *hRemote;
/* [default] */ long hGlobal;
} u;
} userHPALETTE;
typedef struct _RemotableHandle
{
long fContext;
/* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0009
{
/* [case()] */ long hInproc;
/* [case()] */ long hRemote;
} u;
} RemotableHandle;
typedef /* [unique] */ RemotableHandle__RPC_FAR *wireHWND;
typedef /* [unique] */ RemotableHandle__RPC_FAR *wireHMENU;
typedef /* [unique] */ RemotableHandle__RPC_FAR *wireHACCEL;
typedef /* [unique] */ RemotableHandle__RPC_FAR *wireHBRUSH;
typedef /* [unique] */ RemotableHandle__RPC_FAR *wireHFONT;
typedef /* [unique] */ RemotableHandle__RPC_FAR *wireHDC;
typedef /* [unique] */ RemotableHandle__RPC_FAR *wireHICON;
#if 0
typedef /* [wire_marshal] */ void __RPC_FAR*HWND;
typedef /* [wire_marshal] */ void __RPC_FAR*HMENU;
typedef /* [wire_marshal] */ void __RPC_FAR*HACCEL;
typedef /* [wire_marshal] */ void __RPC_FAR*HBRUSH;
typedef /* [wire_marshal] */ void __RPC_FAR*HFONT;
typedef /* [wire_marshal] */ void __RPC_FAR*HDC;
typedef /* [wire_marshal] */ void __RPC_FAR*HICON;
#ifndef _HCURSOR_DEFINED
#define _HCURSOR_DEFINED
typedef HICON HCURSOR;
#endif // !_HCURSOR_DEFINED
/* tagTEXTMETRICW was copied from wingdi.hfor MIDL */
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;
#endif //0
#ifndef _WIN32 // The following code is for Win16only
#ifndef WINAPI // If not included with 3.1headers...
typedef struct tagMSG
{
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG;
typedef struct tagMSG __RPC_FAR *PMSG;
typedef struct tagMSG __RPC_FAR *NPMSG;
typedef struct tagMSG __RPC_FAR *LPMSG;
#endif // _WIN32
#endif // WINAPI
typedef /* [unique] */ userHBITMAP__RPC_FAR *wireHBITMAP;
typedef /* [unique] */ userHPALETTE__RPC_FAR *wireHPALETTE;
typedef /* [unique] */ userHENHMETAFILE__RPC_FAR *wireHENHMETAFILE;
typedef /* [unique] */ userHMETAFILE__RPC_FAR *wireHMETAFILE;
typedef /* [unique] */ userHMETAFILEPICT__RPC_FAR *wireHMETAFILEPICT;
#if 0
typedef /* [wire_marshal] */ void __RPC_FAR*HGLOBAL;
typedef HGLOBAL HLOCAL;
typedef /* [wire_marshal] */ void __RPC_FAR*HBITMAP;
typedef /* [wire_marshal] */ void __RPC_FAR*HPALETTE;
typedef /* [wire_marshal] */ void __RPC_FAR*HENHMETAFILE;
typedef /* [wire_marshal] */ void __RPC_FAR*HMETAFILE;
#endif //0
typedef /* [wire_marshal] */ void __RPC_FAR*HMETAFILEPICT;
extern RPC_IF_HANDLEIWinTypes_v0_1_c_ifspec;
extern RPC_IF_HANDLEIWinTypes_v0_1_s_ifspec;
#endif /* __IWinTypes_INTERFACE_DEFINED__*/
/****************************************
*Generated header for interface: __MIDL_itf_wtypes_0001
* atThu Sep 11 10:57:03 1997
*using MIDL 3.03.0110
****************************************/
/* [local] */
#if ( _MSC_VER >= 800 )
#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 definitionof 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
};
LONGLONG int64;
} CY;
#endif /* 0 */
#endif /* _tagCY_DEFINED */
typedef CY __RPC_FAR *LPCY;
#if 0 /* _tagDEC_DEFINED */
/* The following isn't the real definitionof 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;
};
USHORT signscale;
};
ULONG Hi32;
union {
struct {
#ifdef _MAC
ULONG Mid32;
ULONG Lo32;
#else
ULONG Lo32;
ULONG Mid32;
#endif
};
ULONGLONG Lo64;
};
} DECIMAL;
#define DECIMAL_NEG ((BYTE)0x80)
#define DECIMAL_SETZERO(dec) \
{(dec).Lo64 = 0; (dec).Hi32 = 0; (dec).signscale = 0;}
#endif /* _tagDEC_DEFINED */
typedef DECIMAL __RPC_FAR *LPDECIMAL;
#if ( _MSC_VER >= 800 )
#pragma warning(default:4201)
#endif
typedef /* [unique] */ FLAGGED_WORD_BLOB__RPC_FAR *wireBSTR;
typedef /* [wire_marshal] */ OLECHAR__RPC_FAR *BSTR;
typedef BSTR __RPC_FAR *LPBSTR;
/* 0 == FALSE, -1 == TRUE */
typedef short VARIANT_BOOL;
#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 someimplementations */
/* of the IPropertyStorage interface whenmarshaling BSTRs */
/* on systems which don't support BSTRmarshaling. */
#ifndef _tagBSTRBLOB_DEFINED
#define _tagBSTRBLOB_DEFINED
typedef struct tagBSTRBLOB
{
ULONG cbSize;
/* [size_is] */ BYTE __RPC_FAR *pData;
} BSTRBLOB;
typedef struct tagBSTRBLOB __RPC_FAR*LPBSTRBLOB;
#endif
#define VARIANT_TRUE ((VARIANT_BOOL)0xffff)
#define VARIANT_FALSE ((VARIANT_BOOL)0)
#ifndef _tagBLOB_DEFINED
#define _tagBLOB_DEFINED
#define _BLOB_DEFINED
#define _LPBLOB_DEFINED
typedef struct tagBLOB
{
ULONG cbSize;
/* [size_is] */ BYTE __RPC_FAR *pBlobData;
} BLOB;
typedef struct tagBLOB __RPC_FAR *LPBLOB;
#endif
typedef struct tagCLIPDATA
{
ULONG cbSize;
long ulClipFmt;
/* [size_is] */ BYTE __RPC_FAR *pClipData;
} CLIPDATA;
// Macro to calculate the size of the abovepClipData
#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 Automationstring
* VT_DISPATCH [V][T][P][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 short
* 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_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_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_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_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 = 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;
#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__RPC_FAR *PSID_IDENTIFIER_AUTHORITY;
#endif
#ifndef SID_DEFINED
#define SID_DEFINED
typedef struct _SID
{
UCHAR Revision;
UCHAR SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
/* [size_is] */ ULONG SubAuthority[ 1 ];
} SID;
typedef struct _SID __RPC_FAR *PISID;
#endif
typedef GUID APPID;
typedef struct tagCSPLATFORM
{
DWORD dwPlatformId;
DWORD dwVersionHi;
DWORD dwVersionLo;
DWORD dwProcessorArch;
} CSPLATFORM;
typedef struct tagQUERYCONTEXT
{
DWORD dwContext;
CSPLATFORM Platform;
LCID Locale;
DWORD dwVersionHi;
DWORD dwVersionLo;
} QUERYCONTEXT;
typedef /* [v1_enum] */
enum tagTYSPEC
{ TYSPEC_CLSID = 0,
TYSPEC_FILEEXT = TYSPEC_CLSID + 1,
TYSPEC_MIMETYPE = TYSPEC_FILEEXT + 1,
TYSPEC_PROGID = TYSPEC_MIMETYPE + 1,
TYSPEC_IID = TYSPEC_PROGID + 1,
TYSPEC_TYPELIB = TYSPEC_IID + 1,
TYSPEC_FILENAME = TYSPEC_TYPELIB + 1,
TYSPEC_JAVACLASS = TYSPEC_FILENAME + 1,
TYSPEC_PACKAGENAME = TYSPEC_JAVACLASS + 1
} TYSPEC;
typedef /* [public] */ struct __MIDL___MIDL_itf_wtypes_0001_0001
{
DWORD tyspec;
/* [switch_is] */ /* [switch_type] */ union__MIDL___MIDL_itf_wtypes_0001_0003
{
/* [case()] */ CLSID clsid;
/* [case()] */ IID iid;
/* [case()] */ GUID typelibID;
/* [case()] */ LPOLESTR pFileExt;
/* [case()] */ LPOLESTR pMimeType;
/* [case()] */ LPOLESTR pProgId;
/* [case()] */ LPOLESTR pFileName;
/* [case()] */ LPOLESTR pJavaClassName;
/* [case()] */ LPOLESTR pPackageName;
} tagged_union;
} uCLSSPEC;
typedef struct _PUBLISHEDAPPINFO
{
LPOLESTR pwszFileExtension;
LPOLESTR pwszDisplayName;
LPOLESTR pwszPackagePath;
} PUBLISHEDAPPINFO;
typedef /* [v1_enum] */
enum tagAPPINFOTYPE
{ APPINFO_PUBLISHED = 1,
APPINFO_SHELLNEW = APPINFO_PUBLISHED + 1,
APPINFO_INSERTABLE = APPINFO_SHELLNEW + 1
} APPINFOTYPE;
#define ACTFLG_RunLocally ( 1 )
#define ACTFLG_RunOnce ( 2 )
#define ACTFLG_SystemWide ( 4 )
#define ACTFLG_Published ( 8 )
#define ACTFLG_Assigned ( 16 )
#define ACTFLG_UserInstall ( 32 )
typedef /* [v1_enum] */
enum _CLASSPATHTYPE
{ ExeNamePath = 0,
DllNamePath = ExeNamePath + 1,
TlbNamePath = DllNamePath + 1,
CabFilePath = TlbNamePath + 1,
InfFilePath = CabFilePath + 1,
DrwFilePath = InfFilePath + 1,
SetupNamePath = DrwFilePath + 1
} CLASSPATHTYPE;
typedef struct tagAPPDETAIL
{
GUID AppID;
DWORD cClasses;
/* [size_is] */ CLSID __RPC_FAR *prgClsIdList;
DWORD cTypeLibIds;
/* [size_is] */ CLSID __RPC_FAR *prgTypeLibIdList;
DWORD cServers;
/* [size_is] */ LPOLESTR __RPC_FAR *prgServerNames;
} APPDETAIL;
typedef struct tagPACKAGEDETAIL
{
CLASSPATHTYPE PathType;
LPOLESTR pszPath;
LPOLESTR pszIconPath;
LPOLESTR pszSetupCommand;
DWORD dwActFlags;
LPOLESTR pszVendor;
LPOLESTR pszPackageName;
LPOLESTR pszProductName;
DWORD dwContext;
CSPLATFORM Platform;
LCID Locale;
DWORD dwVersionHi;
DWORD dwVersionLo;
ULONGLONG Usn;
DWORD cApps;
/* [size_is] */ APPDETAIL __RPC_FAR *pAppDetail;
} PACKAGEDETAIL;
typedef struct tagPACKAGEINFO
{
LPOLESTR pszClassIconPath;
CLSID __RPC_FAR *pTreatAsClsid;
DWORD cPackages;
/* [size_is] */ PACKAGEDETAIL __RPC_FAR *pPackageDetail;
} PACKAGEINFO;
extern RPC_IF_HANDLE__MIDL_itf_wtypes_0001_v0_0_c_ifspec;
extern RPC_IF_HANDLE__MIDL_itf_wtypes_0001_v0_0_s_ifspec;
/* Additional Prototypes for ALL interfaces*/
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif