PRIV.H
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:1k
源码类别:
Windows编程
开发平台:
Visual C++
- //--------------------------------------------------------------
- // common user interface routines
- //
- //
- //--------------------------------------------------------------
- #define STRICT
- #define _INC_OLE // WIN32, get ole2 from windows.h
- #define CONST_VTABLE
- #include <windows.h>
- #include <commdlg.h>
- #include <dlgs.h> // commdlg IDs
- #include <shellapi.h>
- #include <commctrl.h>
- #include <windowsx.h>
- #include <ole2.h>
- #include <shlobj.h>
- //
- // defclsf.c
- //
- typedef HRESULT (CALLBACK FAR * LPFNCREATEINSTANCE)(LPUNKNOWN pUnkOuter,
- REFIID riid, LPVOID FAR* ppvObject);
- STDAPI SHCreateDefClassObject(REFIID riid, LPVOID FAR* ppv,
- LPFNCREATEINSTANCE lpfnCI, UINT FAR * pcRefDll,
- REFIID riidInst);
- //
- // Helper macro for implemting OLE classes in C
- //
- #define _IOffset(class, itf) ((UINT)&(((class *)0)->itf))
- #define IToClass(class, itf, pitf) ((class *)(((LPSTR)pitf)-_IOffset(class, itf)))
- #define IToClassN(class, itf, pitf) IToClass(class, itf, pitf)