Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. faxitg.cpp
  5. Abstract:
  6. This file implements the dll exports from this
  7. control(s).
  8. Author:
  9. Wesley Witt (wesw) 13-May-1997
  10. Environment:
  11. User Mode
  12. --*/
  13. #include "stdafx.h"
  14. #include "resource.h"
  15. #include "initguid.h"
  16. #include "faxcom_i.c"
  17. #include "faxtiff.h"
  18. #include "faxsvr.h"
  19. #include "Status.h"
  20. #include "FaxJob.h"
  21. CComModule _Module;
  22. BEGIN_OBJECT_MAP(ObjectMap)
  23. OBJECT_ENTRY(CLSID_FaxTiff, CFaxTiff)
  24. OBJECT_ENTRY(CLSID_FaxServer, CFaxServer)
  25. END_OBJECT_MAP()
  26. extern "C"
  27. BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
  28. {
  29. if (dwReason == DLL_PROCESS_ATTACH) {
  30. _Module.Init(ObjectMap, hInstance);
  31. DisableThreadLibraryCalls(hInstance);
  32. } else if (dwReason == DLL_PROCESS_DETACH) {
  33. _Module.Term();
  34. }
  35. return TRUE;
  36. }
  37. STDAPI DllCanUnloadNow(void)
  38. {
  39. return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
  40. }
  41. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  42. {
  43. return _Module.GetClassObject(rclsid, riid, ppv);
  44. }
  45. STDAPI DllRegisterServer(void)
  46. {
  47. return _Module.RegisterServer(TRUE);
  48. }
  49. STDAPI DllUnregisterServer(void)
  50. {
  51. _Module.UnregisterServer();
  52. return S_OK;
  53. }