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.

310 lines
4.5 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. t30u.c
  5. Abstract:
  6. This is the interface with T.30 DLL
  7. Author:
  8. Rafael Lisitsa (RafaelL) 2-Feb-1996
  9. Revision History:
  10. --*/
  11. #define UNICODE
  12. #define _UNICODE
  13. #include "prep.h"
  14. #include "tiff.h"
  15. #include "glbproto.h"
  16. #include "t30gl.h"
  17. ///////////////////////////////////////////////////////////////////////////////////
  18. VOID CALLBACK
  19. T30LineCallBackFunction(
  20. HANDLE hFax,
  21. DWORD hDevice,
  22. DWORD dwMessage,
  23. DWORD_PTR dwInstance,
  24. DWORD_PTR dwParam1,
  25. DWORD_PTR dwParam2,
  26. DWORD_PTR dwParam3
  27. )
  28. {
  29. T30LineCallBackFunctionA(
  30. hFax,
  31. hDevice,
  32. dwMessage,
  33. dwInstance,
  34. dwParam1,
  35. dwParam2,
  36. dwParam3
  37. );
  38. } /* LineCallBackProc */
  39. ///////////////////////////////////////////////////////////////////////////////////
  40. BOOL WINAPI
  41. FaxDevInitialize(
  42. IN HLINEAPP LineAppHandle,
  43. IN HANDLE HeapHandle,
  44. OUT PFAX_LINECALLBACK *LineCallbackFunction,
  45. IN PFAX_SERVICE_CALLBACK FaxServiceCallback
  46. )
  47. {
  48. return(
  49. FaxDevInitializeA(
  50. LineAppHandle,
  51. HeapHandle,
  52. LineCallbackFunction,
  53. FaxServiceCallback
  54. ));
  55. }
  56. ///////////////////////////////////////////////////////////////////////////////////
  57. BOOL WINAPI
  58. FaxDevStartJob(
  59. HLINE LineHandle,
  60. DWORD DeviceId,
  61. PHANDLE pFaxHandle,
  62. HANDLE CompletionPortHandle,
  63. ULONG_PTR CompletionKey
  64. )
  65. {
  66. return(
  67. FaxDevStartJobA(
  68. LineHandle,
  69. DeviceId,
  70. pFaxHandle,
  71. CompletionPortHandle,
  72. CompletionKey
  73. ));
  74. }
  75. ///////////////////////////////////////////////////////////////////////////////////
  76. BOOL WINAPI
  77. FaxDevEndJob(
  78. HANDLE FaxHandle
  79. )
  80. {
  81. return(
  82. FaxDevEndJobA(
  83. FaxHandle
  84. ));
  85. }
  86. ///////////////////////////////////////////////////////////////////////////////////
  87. BOOL WINAPI
  88. FaxDevSend(
  89. IN HANDLE FaxHandle,
  90. IN PFAX_SEND FaxSend,
  91. IN PFAX_SEND_CALLBACK FaxSendCallback
  92. )
  93. {
  94. FAX_SEND_A NewFaxSend;
  95. NewFaxSend.SizeOfStruct = FaxSend->SizeOfStruct;
  96. NewFaxSend.FileName = UnicodeStringToAnsiString (FaxSend->FileName);
  97. NewFaxSend.CallerName = UnicodeStringToAnsiString (FaxSend->CallerName);
  98. NewFaxSend.CallerNumber = UnicodeStringToAnsiString (FaxSend->CallerNumber);
  99. NewFaxSend.ReceiverName = UnicodeStringToAnsiString (FaxSend->ReceiverName);
  100. NewFaxSend.ReceiverNumber = UnicodeStringToAnsiString (FaxSend->ReceiverNumber);
  101. return(
  102. FaxDevSendA(
  103. FaxHandle,
  104. &NewFaxSend,
  105. FaxSendCallback
  106. ));
  107. }
  108. ///////////////////////////////////////////////////////////////////////////////////
  109. BOOL WINAPI
  110. FaxDevReceive(
  111. HANDLE FaxHandle,
  112. HCALL CallHandle,
  113. PFAX_RECEIVE FaxReceive
  114. )
  115. {
  116. FAX_RECEIVE_A NewFaxReceive;
  117. NewFaxReceive.SizeOfStruct = FaxReceive->SizeOfStruct;
  118. NewFaxReceive.FileName = UnicodeStringToAnsiString(FaxReceive->FileName);
  119. NewFaxReceive.ReceiverName = UnicodeStringToAnsiString(FaxReceive->ReceiverName);
  120. NewFaxReceive.ReceiverNumber = UnicodeStringToAnsiString(FaxReceive->ReceiverNumber);
  121. return(
  122. FaxDevReceiveA(
  123. FaxHandle,
  124. CallHandle,
  125. &NewFaxReceive
  126. ));
  127. }
  128. ///////////////////////////////////////////////////////////////////////////////////
  129. BOOL WINAPI
  130. FaxDevReportStatus(
  131. IN HANDLE FaxHandle OPTIONAL,
  132. OUT PFAX_DEV_STATUS FaxStatus,
  133. IN DWORD FaxStatusSize,
  134. OUT LPDWORD FaxStatusSizeRequired
  135. )
  136. {
  137. return(
  138. FaxDevReportStatusA(
  139. FaxHandle,
  140. FaxStatus,
  141. FaxStatusSize,
  142. FaxStatusSizeRequired
  143. ));
  144. }
  145. ///////////////////////////////////////////////////////////////////////////////////
  146. BOOL WINAPI
  147. FaxDevAbortOperation(
  148. HANDLE FaxHandle
  149. )
  150. {
  151. return(
  152. FaxDevAbortOperationA(
  153. FaxHandle
  154. ));
  155. }
  156. ////////////////////////////////////////////////////////////////////////////
  157. HANDLE
  158. TiffCreateW(
  159. LPWSTR FileName,
  160. DWORD CompressionType,
  161. DWORD ImageWidth,
  162. DWORD FillOrder,
  163. DWORD HiRes
  164. )
  165. {
  166. return(
  167. TiffCreate(
  168. FileName,
  169. CompressionType,
  170. ImageWidth,
  171. FillOrder,
  172. HiRes
  173. ));
  174. }
  175. HANDLE
  176. TiffOpenW(
  177. LPWSTR FileName,
  178. PTIFF_INFO TiffInfo,
  179. BOOL ReadOnly
  180. )
  181. {
  182. return (
  183. TiffOpen(
  184. FileName,
  185. TiffInfo,
  186. ReadOnly,
  187. FILLORDER_LSB2MSB
  188. ));
  189. }