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.

203 lines
5.7 KiB

  1. /*++
  2. Copyright (c) 1999 - 2000 Microsoft Corporation
  3. Module Name:
  4. faxcfgwz.h
  5. Abstract:
  6. Fax configuration wizard header file
  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. #ifndef _FAX_CONFIG_WIZARD_H_
  16. #define _FAX_CONFIG_WIZARD_H_
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include <windows.h>
  21. #include <windowsx.h>
  22. #include <shlobj.h>
  23. #include <shlobjp.h>
  24. #include <shellapi.h>
  25. #include <winspool.h>
  26. #include <commdlg.h>
  27. #include "tchar.h"
  28. #include <faxutil.h>
  29. #include <fxsapip.h>
  30. #include <faxreg.h>
  31. #include <faxroute.h>
  32. #include <faxuiconstants.h>
  33. #include <htmlhelp.h>
  34. //
  35. // our header files
  36. //
  37. #include "resource.h"
  38. #include "FaxCfgWzExp.h"
  39. #define MAX_STRING_LEN MAX_PATH
  40. #define MAX_MESSAGE_LEN 512
  41. #define MAX_ARCHIVE_DIR MAX_PATH - 16
  42. #define MAX_DEVICE_NAME MAX_PATH
  43. #define DI_Modem 0
  44. enum _ROUT_METHODS
  45. {
  46. RM_FOLDER=0,
  47. RM_PRINT,
  48. RM_COUNT // number of routing methods
  49. };
  50. extern HINSTANCE g_hModule; // DLL instance handle
  51. extern HINSTANCE g_hResource; // Resource DLL instance handle
  52. extern HANDLE g_hFaxSvcHandle; // fax handle for send configuration
  53. extern LIST_ENTRY g_PageList; // to keep track of the previous page.
  54. extern BOOL g_bShowDevicePages;
  55. extern BOOL g_bShowUserInfo;
  56. extern const LPCTSTR g_RoutingGuids[RM_COUNT];
  57. typedef BOOL (*PINSTNEWDEV)(HWND, LPGUID, PDWORD);
  58. #define NEW_DEV_DLL TEXT("hdwwiz.cpl")
  59. // used by GetProcAddress should be ANSI
  60. #define INSTALL_NEW_DEVICE "InstallNewDevice"
  61. typedef struct _PAGE_INFO
  62. {
  63. LIST_ENTRY ListEntry;
  64. INT pageId;
  65. } PAGE_INFO, *PPAGE_INFO;
  66. typedef struct _DEVICEINFO
  67. {
  68. DWORD dwDeviceId; // Unique device ID for fax device
  69. LPTSTR szDeviceName; // Name of specific device
  70. BOOL bSend; // Send enabled
  71. FAX_ENUM_DEVICE_RECEIVE_MODE ReceiveMode; // Receive mode
  72. BOOL bSelected; // The device is selected for fax operations
  73. } DEVICEINFO, *PDEVICEINFO;
  74. typedef struct _ROUTINFO
  75. {
  76. BOOL bEnabled;
  77. TCHAR tszCurSel[MAX_PATH];
  78. } ROUTINFO;
  79. typedef struct _WIZARDDATA
  80. {
  81. HFONT hTitleFont; // The title font for the Welcome and Completion pages
  82. HWND hWndParent; // the window handle of the caller function
  83. BOOL bFinishPressed; // whether the user clicks the finish button
  84. DWORD dwDeviceLimit; // maximum number of the fax devices for the current SKU
  85. LPTSTR szTsid; // Transmit station Id
  86. LPTSTR szCsid; // Caller station Id
  87. DWORD dwRingCount; // number of rings allow before answering the call
  88. DWORD dwDeviceCount; // number of available devices
  89. LPDWORD pdwSendDevOrder; // device order for sending faxes
  90. ROUTINFO pRouteInfo[RM_COUNT]; // routing info
  91. PDEVICEINFO pDevInfo; // pointer to structure of DEVICEINFO,
  92. FAX_PERSONAL_PROFILE userInfo; // user information
  93. } WIZARDDATA, *PWIZARDDATA;
  94. extern WIZARDDATA g_wizData;
  95. // RunDll32 entry point in dll.c
  96. void CALLBACK FaxCfgWzrdDllW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow);
  97. // Functions in FaxCfgWz.c
  98. BOOL LoadWizardData();
  99. BOOL SaveWizardData();
  100. VOID FreeWizardData();
  101. BOOL LoadWizardFont();
  102. BOOL SetLastPage(INT pageId);
  103. BOOL ClearPageList(VOID);
  104. BOOL RemoveLastPage(HWND hwnd);
  105. // Functions in userinfo.c
  106. INT_PTR CALLBACK AddressDetailDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  107. INT_PTR CALLBACK UserInfoDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  108. BOOL LoadUserInfo();
  109. BOOL SaveUserInfo();
  110. VOID FreeUserInfo();
  111. // Functions in welcome.c
  112. INT_PTR CALLBACK WelcomeDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  113. // Functions in devlimit.c
  114. INT_PTR CALLBACK DevLimitDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  115. // Functions in onedevlimit.c
  116. INT_PTR CALLBACK OneDevLimitDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  117. // Functions in sendwzrd.c
  118. INT_PTR CALLBACK SendDeviceDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  119. INT_PTR CALLBACK SendTsidDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  120. // Functions in recvwzrd.c
  121. INT_PTR CALLBACK RecvDeviceDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  122. INT_PTR CALLBACK RecvCsidDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  123. // Functions in route.c
  124. INT_PTR CALLBACK RecvRouteDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  125. // Functions in complete.c
  126. INT_PTR CALLBACK CompleteDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  127. // Functions in util.c
  128. VOID LimitTextFields(HWND hDlg, INT *pLimitInfo);
  129. INT DisplayMessageDialog(HWND hwndParent, UINT type, INT titleStrId, INT formatStrId,...);
  130. BOOL BrowseForDirectory(HWND hDlg, INT hResource, LPTSTR title);
  131. BOOL Connect(VOID);
  132. VOID DisConnect(VOID);
  133. VOID InstallModem(HWND hWnd);
  134. BOOL StartFaxService(LPTSTR pServerName);
  135. BOOL IsFaxDeviceInstalled(HWND hWnd, LPBOOL);
  136. BOOL IsUserInfoConfigured();
  137. BOOL FaxDeviceEnableRoutingMethod(HANDLE hFaxHandle, DWORD dwDeviceId, LPCTSTR RoutingGuid, LONG Enabled);
  138. VOID ListView_SetDeviceImageList(HWND hwndLv, HINSTANCE hinst);
  139. BOOL IsSendEnable();
  140. BOOL IsReceiveEnable();
  141. int GetDevIndexByDevId(DWORD dwDeviceId);
  142. VOID InitDeviceList(HWND hDlg, DWORD dwListViewResId);
  143. #ifdef __cplusplus
  144. }
  145. #endif
  146. #endif