home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / addins / cmdwnd / cmdstub / dlldatax.c < prev    next >
C/C++ Source or Header  |  1998-04-02  |  1KB  |  43 lines

  1. // wrapper for dlldata.c
  2.  
  3. #ifdef _MERGE_PROXYSTUB // merge proxy stub DLL
  4.  
  5. #define REGISTER_PROXY_DLL //DllRegisterServer, etc.
  6.  
  7. #define _WIN32_WINNT 0x0400    //for WinNT 4.0 or Win95 with DCOM
  8. #define USE_STUBLESS_PROXY    //defined only with MIDL switch /Oicf
  9.  
  10. #pragma comment(lib, "rpcndr.lib")
  11. #pragma comment(lib, "rpcns4.lib")
  12. #pragma comment(lib, "rpcrt4.lib")
  13.  
  14. #define DllMain                PrxDllMain
  15. #define DllRegisterServer    PrxDllRegisterServer
  16. #define DllUnregisterServer PrxDllUnregisterServer
  17. #define DllGetClassObject   PrxDllGetClassObject
  18. #define DllCanUnloadNow     PrxDllCanUnloadNow
  19.  
  20. #include "dlldata.c"
  21. #include "cmdstub_p.c"
  22.  
  23. #ifdef _NOPROXY //no midl generated dlldata.c
  24.  
  25. #define STRICT 1
  26. #include <ole2.h>
  27.  
  28. BOOL WINAPI PrxDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  29. {return TRUE;}
  30.  
  31. STDAPI PrxDllCanUnloadNow(void){return S_OK;}
  32.  
  33. STDAPI PrxDllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  34. {return CLASS_E_CLASSNOTAVAILABLE;}
  35.  
  36. STDAPI PrxDllRegisterServer(void){return S_OK;}
  37.  
  38. STDAPI PrxDllUnregisterServer(void){return S_OK;}
  39.  
  40. #endif //!PROXY_DELEGATION
  41.  
  42. #endif //_MERGE_PROXYSTUB
  43.