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.

209 lines
5.0 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
  4. EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
  5. WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
  6. Module Name:
  7. faxdev.h
  8. Abstract:
  9. This file contains the prototypes for the
  10. FAX device provider API.
  11. --*/
  12. #include <commctrl.h>
  13. #ifndef _FAXDEV_
  14. #define _FAXDEV_
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. //
  22. // FAX status constants
  23. //
  24. #define FS_INITIALIZING 0x20000000
  25. #define FS_DIALING 0x20000001
  26. #define FS_TRANSMITTING 0x20000002
  27. #define FS_RECEIVING 0x20000004
  28. #define FS_COMPLETED 0x20000008
  29. #define FS_HANDLED 0x20000010
  30. #define FS_LINE_UNAVAILABLE 0x20000020
  31. #define FS_BUSY 0x20000040
  32. #define FS_NO_ANSWER 0x20000080
  33. #define FS_BAD_ADDRESS 0x20000100
  34. #define FS_NO_DIAL_TONE 0x20000200
  35. #define FS_DISCONNECTED 0x20000400
  36. #define FS_FATAL_ERROR 0x20000800
  37. #define FS_NOT_FAX_CALL 0x20001000
  38. #define FS_CALL_DELAYED 0x20002000
  39. #define FS_CALL_BLACKLISTED 0x20004000
  40. #define FS_USER_ABORT 0x20200000
  41. #define FS_ANSWERED 0x20800000
  42. //
  43. // data structures
  44. //
  45. typedef struct _FAX_SEND {
  46. DWORD SizeOfStruct;
  47. LPWSTR FileName;
  48. LPWSTR CallerName;
  49. LPWSTR CallerNumber;
  50. LPWSTR ReceiverName;
  51. LPWSTR ReceiverNumber;
  52. BOOL Branding;
  53. HCALL CallHandle;
  54. DWORD Reserved[3];
  55. } FAX_SEND, *PFAX_SEND;
  56. typedef struct _FAX_RECEIVE {
  57. DWORD SizeOfStruct;
  58. LPWSTR FileName;
  59. LPWSTR ReceiverName;
  60. LPWSTR ReceiverNumber;
  61. DWORD Reserved[4];
  62. } FAX_RECEIVE, *PFAX_RECEIVE;
  63. typedef struct _FAX_DEV_STATUS {
  64. DWORD SizeOfStruct;
  65. DWORD StatusId;
  66. DWORD StringId;
  67. DWORD PageCount;
  68. LPWSTR CSI;
  69. LPWSTR CallerId;
  70. LPWSTR RoutingInfo;
  71. DWORD ErrorCode;
  72. DWORD Reserved[3];
  73. } FAX_DEV_STATUS, *PFAX_DEV_STATUS;
  74. typedef BOOL
  75. (CALLBACK *PFAX_SERVICE_CALLBACK)(
  76. IN HANDLE FaxHandle,
  77. IN DWORD DeviceId,
  78. IN DWORD_PTR Param1,
  79. IN DWORD_PTR Param2,
  80. IN DWORD_PTR Param3
  81. );
  82. typedef void
  83. (CALLBACK *PFAX_LINECALLBACK)(
  84. IN HANDLE FaxHandle,
  85. IN DWORD hDevice,
  86. IN DWORD dwMessage,
  87. IN DWORD_PTR dwInstance,
  88. IN DWORD_PTR dwParam1,
  89. IN DWORD_PTR dwParam2,
  90. IN DWORD_PTR dwParam3
  91. );
  92. BOOL WINAPI
  93. FaxDevInitialize(
  94. IN HLINEAPP LineAppHandle,
  95. IN HANDLE HeapHandle,
  96. OUT PFAX_LINECALLBACK *LineCallbackFunction,
  97. IN PFAX_SERVICE_CALLBACK FaxServiceCallback
  98. );
  99. HRESULT WINAPI FaxDevShutdown(
  100. void
  101. );
  102. BOOL WINAPI
  103. FaxDevVirtualDeviceCreation(
  104. OUT LPDWORD DeviceCount,
  105. OUT LPWSTR DeviceNamePrefix,
  106. OUT LPDWORD DeviceIdPrefix,
  107. IN HANDLE CompletionPort,
  108. IN ULONG_PTR CompletionKey
  109. );
  110. BOOL WINAPI
  111. FaxDevStartJob(
  112. IN HLINE LineHandle,
  113. IN DWORD DeviceId,
  114. OUT PHANDLE FaxHandle,
  115. IN HANDLE CompletionPortHandle,
  116. IN ULONG_PTR CompletionKey
  117. );
  118. BOOL WINAPI
  119. FaxDevEndJob(
  120. IN HANDLE FaxHandle
  121. );
  122. typedef BOOL
  123. (CALLBACK *PFAX_SEND_CALLBACK)(
  124. IN HANDLE FaxHandle,
  125. IN HCALL CallHandle,
  126. IN DWORD Reserved1,
  127. IN DWORD Reserved2
  128. );
  129. BOOL WINAPI
  130. FaxDevSend(
  131. IN HANDLE FaxHandle,
  132. IN PFAX_SEND FaxSend,
  133. IN PFAX_SEND_CALLBACK FaxSendCallback
  134. );
  135. #define FAXDEVRECEIVE_SIZE 4096
  136. BOOL WINAPI
  137. FaxDevReceive(
  138. IN HANDLE FaxHandle,
  139. IN HCALL CallHandle,
  140. IN OUT PFAX_RECEIVE FaxReceive
  141. );
  142. #define FAXDEVREPORTSTATUS_SIZE 4096
  143. BOOL WINAPI
  144. FaxDevReportStatus(
  145. IN HANDLE FaxHandle OPTIONAL,
  146. OUT PFAX_DEV_STATUS FaxStatus,
  147. IN DWORD FaxStatusSize,
  148. OUT LPDWORD FaxStatusSizeRequired
  149. );
  150. BOOL WINAPI
  151. FaxDevAbortOperation(
  152. IN HANDLE FaxHandle
  153. );
  154. BOOL WINAPI
  155. FaxDevConfigure(
  156. OUT HPROPSHEETPAGE *PropSheetPage
  157. );
  158. typedef BOOL (WINAPI *PFAXDEVINITIALIZE) (HLINEAPP,HANDLE,PFAX_LINECALLBACK*,PFAX_SERVICE_CALLBACK);
  159. typedef BOOL (WINAPI *PFAXDEVVIRTUALDEVICECREATION) (LPDWORD,LPWSTR,LPDWORD,HANDLE,ULONG_PTR);
  160. typedef BOOL (WINAPI *PFAXDEVSTARTJOB) (HLINE,DWORD,PHANDLE,HANDLE,ULONG_PTR);
  161. typedef BOOL (WINAPI *PFAXDEVENDJOB) (HANDLE);
  162. typedef BOOL (WINAPI *PFAXDEVSEND) (HANDLE,PFAX_SEND,PFAX_SEND_CALLBACK);
  163. typedef BOOL (WINAPI *PFAXDEVRECEIVE) (HANDLE,HCALL,PFAX_RECEIVE);
  164. typedef BOOL (WINAPI *PFAXDEVREPORTSTATUS) (HANDLE,PFAX_DEV_STATUS,DWORD,LPDWORD);
  165. typedef BOOL (WINAPI *PFAXDEVABORTOPERATION) (HANDLE);
  166. typedef BOOL (WINAPI *PFAXDEVCONFIGURE) (HPROPSHEETPAGE*);
  167. typedef HRESULT (WINAPI * PFAXDEVSHUTDOWN) (void);
  168. #ifdef __cplusplus
  169. }
  170. #endif
  171. #endif