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.

217 lines
10 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. faxvrfy.h
  5. Abstract:
  6. This module contains the global definitions
  7. Author:
  8. Steven Kehrli (steveke) 11/15/1997
  9. --*/
  10. #ifndef _FAXVRFY_H
  11. #define _FAXVRFY_H
  12. #include "ntlog.h"
  13. #include <ras.h>
  14. // FAXVRFY_NAME is the name of the FaxVrfy application
  15. #define FAXVRFY_NAME L"FaxVrfy"
  16. // FAXVRFY_HLP is the name of the FaxVrfy help file
  17. #define FAXVRFY_HLP L"faxvrfy.hlp"
  18. // FAXRCV_DLL is the name of the FaxRcv dll
  19. #define FAXRCV_DLL L"faxrcv.dll"
  20. // FAXVRFY_LOG is the name of the FaxVrfy log file
  21. #define FAXVRFY_LOG L"faxvrfy.log"
  22. // FAXVRFY_TXT is the name of the FaxVrfy text file
  23. #define FAXVRFY_TXT L"faxvrfy.txt"
  24. // FAXVRFY_INI is the name of the FaxVrfy ini
  25. #define FAXVRFY_INI L"faxvrfy.ini"
  26. // FAXBVT_TIF is the name of the tif file for the BVT test
  27. #define FAXBVT_TIF L"faxbvt.tif"
  28. // FAXWHQL_TIF is the name of the tif file for the WHQL test
  29. #define FAXWHQL_TIF L"faxwhql.tif"
  30. // FAXVRFY_CMD_HELP is the help command line parameter
  31. #define FAXVRFY_CMD_HELP_1 L"/?"
  32. #define FAXVRFY_CMD_HELP_2 L"/h"
  33. #define FAXVRFY_CMD_HELP_3 L"-?"
  34. #define FAXVRFY_CMD_HELP_4 L"-h"
  35. // FAXVRFY_CMD_BVT is the BVT command line parameter
  36. #define FAXVRFY_CMD_BVT_1 L"/bvt"
  37. #define FAXVRFY_CMD_BVT_2 L"-bvt"
  38. // FAXVRFY_CMD_SEND is the send command line parameter
  39. #define FAXVRFY_CMD_SEND_1 L"/s"
  40. #define FAXVRFY_CMD_SEND_2 L"-s"
  41. // FAXVRFY_CMD_RECEIVE is the receive command line parameter
  42. #define FAXVRFY_CMD_RECEIVE_1 L"/r"
  43. #define FAXVRFY_CMD_RECEIVE_2 L"-r"
  44. // FAXVRFY_CMD_GO is the go command line parameter
  45. #define FAXVRFY_CMD_GO_1 L"/g"
  46. #define FAXVRFY_CMD_GO_2 L"-g"
  47. // FAXVRFY_CMD_NO_CHECK is the no check command line parameter
  48. #define FAXVRFY_CMD_NO_CHECK_1 L"/x"
  49. #define FAXVRFY_CMD_NO_CHECK_2 L"-x"
  50. // ENCODE_CHAR_LEN is the text length limit of the encoding character.
  51. #define ENCODE_CHAR_LEN 1
  52. // CONTROL_CHAR_LEN is the text length limit of the control characters.
  53. #define CONTROL_CHAR_LEN 2
  54. // PHONE_NUM_LEN is the text length limit of phone number edit controls. The length of 17 corresponds to the TSID limit for the fax service (20) minus 3 characters for encoding
  55. #define PHONE_NUM_LEN 17
  56. // TX_CONTROL_CHARS are the control characters when sending
  57. #define TX_CONTROL_CHARS L"TX"
  58. // RX_CONTROL_CHARS are the control characters when receiving
  59. #define RX_CONTROL_CHARS L"RX"
  60. // FAXSVC_RETRIES is the number of retries
  61. #define FAXSVC_RETRIES 2
  62. // FAXSVC_RETRYDELAY is the retry delay
  63. #define FAXSVC_RETRYDELAY 3
  64. // FAXBVT_PAGES is the number of pages in the BVT fax
  65. #define FAXBVT_PAGES 1
  66. // FAXWHQL_PAGES is the number of pages in the WHQL fax
  67. #define FAXWHQL_PAGES 5
  68. // FAXBVT_NUM_FAXES is the number of faxes to send for BVT
  69. #define FAXBVT_NUM_FAXES 1
  70. // FAXWHQL_NUM_FAXES is the number of faxes to send for WHQL
  71. #define FAXWHQL_NUM_FAXES 2
  72. // UM_FAXVRFY_INITIALIZE is the message to initialize the application window
  73. #define UM_FAXVRFY_INITIALIZE (WM_USER + 1)
  74. // UM_FAXVRFY_UPDATE is the message to update the test
  75. #define UM_FAXVRFY_UPDATE (WM_USER + 2)
  76. // UM_FAXVRFY_RESET is the message to reset the test
  77. #define UM_FAXVRFY_RESET (WM_USER + 3)
  78. // UM_TIMEOUT_ENDED is the message to indicate the timeout ended
  79. #define UM_TIMEOUT_ENDED (WM_USER + 4)
  80. // UM_FAXSVC_ENDED is the message to indicate the fax service stopped
  81. #define UM_FAXSVC_ENDED (WM_USER + 5)
  82. // UM_ITERATION_STOPPED is the message to indicate the iteration stopped
  83. #define UM_ITERATION_STOPPED (WM_USER + 6)
  84. // UM_ITERATION_PASSED is the message to indicate the iteration passed
  85. #define UM_ITERATION_PASSED (WM_USER + 7)
  86. // UM_ITERATION_FAILED is the message to indicate the iteration failed
  87. #define UM_ITERATION_FAILED (WM_USER + 8)
  88. // UM_UPDATE_STATUS is a message to update the Status List
  89. #define UM_UPDATE_STATUS (WM_USER + 11)
  90. HWND g_hWndDlg; // g_hWndDlg is the handle to the Setup Dialog
  91. HANDLE g_hLogFile = NULL; // g_hLogFile is the handle to the log file
  92. HANDLE g_hTxtFile = INVALID_HANDLE_VALUE; // g_hLogFile is the handle to the text file
  93. BOOL g_bBVT = FALSE; // g_bBVT indicates BVT command line parameter
  94. BOOL g_bSend = FALSE; // g_bSend indicates send command line parameter
  95. BOOL g_bGo = FALSE; // g_bGo indicates go command line parameter
  96. BOOL g_bNoCheck = FALSE; // g_bNoCheck indicates no check command line parameter
  97. HANDLE g_hStartEvent; // g_hStartEvent is the handle to the Start event
  98. HANDLE g_hStopEvent; // g_hStopEvent is the handle to the Stop event
  99. HANDLE g_hFaxEvent; // g_hFaxEvent is the handle to the event to indicate the Fax Service stopped
  100. HANDLE g_hExitEvent; // g_hExitEvent is the handle to the Exit event
  101. HANDLE g_hRasPassedEvent; // g_hRasPassedEvent is the handle to the RAS Passed event
  102. HANDLE g_hRasFailedEvent; // g_hRasFailedEvent is the handle to the RAS Failed event
  103. HANDLE g_hSendPassedEvent; // g_hSendPassedEvent is the handle to the Send Passed event
  104. HANDLE g_hSendFailedEvent; // g_hSendFailedEvent is the handle to the Send Failed event
  105. HANDLE g_hFaxSvcHandle; // g_hFaxSvcHandle is the handle to the Fax Service
  106. PFAX_PORT_INFO g_pFaxPortsConfig; // g_pFaxPorts is the pointer to the Fax Ports Configuration
  107. DWORD g_dwNumPorts; // g_dwNumPorts is the number of Ports
  108. DWORD g_dwNumAvailPorts; // g_dwNumAvailPorts is the number of Available Ports
  109. PFAX_CONFIGURATION g_pFaxSvcConfig; // g_pFaxConfig is the pointer to the Fax Service Configuration
  110. BOOL g_bFaxSndInProgress = FALSE; // g_bFaxSndInProgress indicates if a fax send is in progress
  111. DWORD g_dwFaxId = 0; // g_dwFaxId is the fax job id of the fax
  112. DWORD g_dwAttempt = 0; // g_dwAttempt is the attempt number of the fax
  113. BOOL g_bFaxRcvInProgress = FALSE; // g_bFaxRcvInProgress indicates if a fax receive is in progress
  114. HANDLE g_hCompletionPort; // g_hCompletionPort is the handle to the completion port
  115. BOOL g_bTestFailed = FALSE; // g_bTestFailed indicates the test failed
  116. DWORD g_dwNumPassed = 0; // g_dwNumPassed is the number of passed iterations
  117. DWORD g_dwNumFailed = 0; // g_dwNumFailed is the number of failed iterations
  118. DWORD g_dwNumTotal = 0; // g_dwNumTotal is the number of total iterations
  119. WCHAR g_szSndNumber[PHONE_NUM_LEN + 1]; // g_szSndNumber is the send phone number
  120. WCHAR g_szRcvNumber[PHONE_NUM_LEN + 1]; // g_szRcvNumber is the receive phone number
  121. WCHAR g_szRasUserName[UNLEN + 1]; // g_szRasUserName is the RAS user name
  122. WCHAR g_szRasPassword[PWLEN + 1]; // g_szRasPassword is the RAS password
  123. WCHAR g_szRasDomain[DNLEN + 1]; // g_szRasDomain is the RAS domain
  124. BOOL g_bNTLogAvailable = FALSE; // g_bNTLogAvailable indicates if NTLog is available
  125. BOOL g_bRasAvailable = FALSE; // g_bRasAvailable indicates if RAS is available
  126. BOOL g_bRasEnabled = FALSE; // g_bRasEnables indicates if RAS is enabled
  127. #define FAXDEVICES_REGKEY L"Software\\Microsoft\\Fax\\Devices"
  128. #define MODEM_REGKEY L"\\Modem"
  129. #define FIXMODEMCLASS_REGVALUE L"FixModemClass"
  130. // FAX_DIALING_INFO is a structure that is the fax dialing info
  131. typedef struct _FAX_DIALING_INFO {
  132. DWORD dwAttempt; // Attempt number
  133. DWORD dwDeviceId; // Device id
  134. } FAX_DIALING_INFO, *PFAX_DIALING_INFO;
  135. // FAX_RECEIVE_INFO is a structure that is the fax receive info
  136. typedef struct _FAX_RECEIVE_INFO {
  137. LPWSTR szCopyTiffName; // Attempt number
  138. DWORD dwDeviceId; // Device id
  139. } FAX_RECEIVE_INFO, *PFAX_RECEIVE_INFO;
  140. // NTLOG_DLL is the name of the dll that contains all of the NTLOG API's
  141. #define NTLOG_DLL L"ntlog.dll"
  142. // NTLOG_API is a structure that points to the NTLOG API's
  143. typedef struct _NTLOG_API {
  144. HINSTANCE hInstance; // Handle to the instance of the dll
  145. PTLCREATELOG ptlCreateLog; // tlCreateLog
  146. PTLDESTROYLOG ptlDestroyLog; // tlDestroyLog
  147. PTLADDPARTICIPANT ptlAddParticipant; // tlAddParticipant
  148. PTLREMOVEPARTICIPANT ptlRemoveParticipant; // tlRemoveParticipant
  149. PTLLOG ptlLog; // tlLog
  150. } NTLOG_API, *PNTLOG_API;
  151. // g_NTLogApi is the global NTLOG_API object
  152. NTLOG_API g_NTLogApi;
  153. // RASAPI32_DLL is the name of the dll that contains all of the RAS API's
  154. #define RASAPI32_DLL L"\\rasapi32.dll"
  155. // RAS_API is a structure that points to the RAS API's
  156. typedef struct _RAS_API {
  157. HINSTANCE hInstance; // Handle to the instance of the dll
  158. FARPROC RasDial; // RasDial
  159. FARPROC RasGetErrorString; // RasGetErrorString
  160. FARPROC RasGetConnectStatus; // RasGetConnectStatus
  161. FARPROC RasGetConnectionStatistics; // RasGetConnectionStatistics
  162. FARPROC RasHangUp; // RasHangUp
  163. } RAS_API, *PRAS_API;
  164. // g_RasApi is the global RAS_API object
  165. RAS_API g_RasApi;
  166. // RAS_INFO is a structure that is the RAS connection info
  167. typedef struct _RAS_INFO {
  168. DWORD dwBps; // Connection speed
  169. LPWSTR szDeviceName; // Device name
  170. } RAS_INFO, *PRAS_INFO;
  171. #endif