Leaked source code of windows server 2003
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.

105 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 1999 - 2000 Microsoft Corporation
  3. Module Name:
  4. dll.c
  5. Abstract:
  6. Dynamic library entry point
  7. Environment:
  8. Fax configuration wizard
  9. Revision History:
  10. 03/13/00 -taoyuan-
  11. Created it.
  12. mm/dd/yy -author-
  13. description
  14. --*/
  15. #include "faxcfgwz.h"
  16. #include <faxres.h>
  17. HINSTANCE g_hModule = NULL; // DLL instance handle
  18. HINSTANCE g_hResource = NULL; // Resource DLL instance handle
  19. BOOL
  20. DllMain(
  21. HINSTANCE hInstance,
  22. ULONG ulReason,
  23. PCONTEXT pContext
  24. )
  25. /*++
  26. Routine Description:
  27. DLL initialization procedure.
  28. Arguments:
  29. hModule - DLL instance handle
  30. ulReason - Reason for the call
  31. pContext - Pointer to context (not used by us)
  32. Return Value:
  33. TRUE if DLL is initialized successfully, FALSE otherwise.
  34. --*/
  35. {
  36. DEBUG_FUNCTION_NAME(TEXT("DllMain of Fax Config Wizard"));
  37. switch (ulReason)
  38. {
  39. case DLL_PROCESS_ATTACH:
  40. DisableThreadLibraryCalls(hInstance);
  41. g_hModule = hInstance;
  42. g_hResource = GetResInstance(hInstance);
  43. if(!g_hResource)
  44. {
  45. return FALSE;
  46. }
  47. break;
  48. case DLL_PROCESS_DETACH:
  49. FreeResInstance();
  50. HeapCleanup();
  51. break;
  52. }
  53. return TRUE;
  54. }
  55. void CALLBACK
  56. FaxCfgWzrdDllW(
  57. HWND hwnd,
  58. HINSTANCE hinst,
  59. LPWSTR lpszCmdLine,
  60. int nCmdShow
  61. )
  62. /*++
  63. Routine Description:
  64. RunDll32.exe entry point
  65. --*/
  66. {
  67. BOOL bAbort;
  68. DEBUG_FUNCTION_NAME(TEXT("FaxCfgWzrdDllW()"));
  69. //
  70. // Explicit launch
  71. //
  72. FaxConfigWizard(TRUE, &bAbort);
  73. }