home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / DROPEXT.PAK / PRIV.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  1.0 KB  |  37 lines

  1. //--------------------------------------------------------------
  2. // common user interface routines
  3. //
  4. //
  5. //--------------------------------------------------------------
  6.  
  7. #define STRICT
  8. #define _INC_OLE        // WIN32, get ole2 from windows.h
  9. #define CONST_VTABLE
  10.  
  11. #include <windows.h>
  12. #include <commdlg.h>
  13. #include <dlgs.h>       // commdlg IDs
  14. #include <shellapi.h>
  15. #include <commctrl.h>
  16. #include <windowsx.h>
  17. #include <ole2.h>
  18. #include <shlobj.h>
  19.  
  20. //
  21. // defclsf.c
  22. //
  23. typedef HRESULT (CALLBACK FAR * LPFNCREATEINSTANCE)(LPUNKNOWN pUnkOuter,
  24.     REFIID riid, LPVOID FAR* ppvObject);
  25.  
  26. STDAPI SHCreateDefClassObject(REFIID riid, LPVOID FAR* ppv,
  27.              LPFNCREATEINSTANCE lpfnCI, UINT FAR * pcRefDll,
  28.              REFIID riidInst);
  29.  
  30. //
  31. // Helper macro for implemting OLE classes in C
  32. //
  33. #define _IOffset(class, itf)         ((UINT)&(((class *)0)->itf))
  34. #define IToClass(class, itf, pitf)   ((class  *)(((LPSTR)pitf)-_IOffset(class, itf)))
  35. #define IToClassN(class, itf, pitf)  IToClass(class, itf, pitf)
  36.  
  37.