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.

68 lines
1.2 KiB

  1. #include "isapi.h"
  2. #pragma hdrstop
  3. BOOL
  4. IsapiFaxConnect(
  5. LPEXTENSION_CONTROL_BLOCK Ecb
  6. )
  7. {
  8. LPBYTE Data = (LPBYTE)(((LPBYTE)Ecb->lpbData)+sizeof(DWORD));
  9. HANDLE FaxHandle;
  10. if (!FaxConnectFaxServer( (LPWSTR) Data, &FaxHandle )) {
  11. SendError( Ecb, GetLastError() );
  12. return FALSE;
  13. }
  14. return SendResponseWithData( Ecb, (LPBYTE)&FaxHandle, sizeof(FaxHandle) );
  15. }
  16. BOOL
  17. IsapiFaxDisConnect(
  18. LPEXTENSION_CONTROL_BLOCK Ecb
  19. )
  20. {
  21. LPBYTE Data = (LPBYTE)(((LPBYTE)Ecb->lpbData)+sizeof(DWORD));
  22. HANDLE FaxHandle;
  23. FaxHandle = (HANDLE) *((LPDWORD)Data);
  24. if (!FaxClose( FaxHandle )) {
  25. return FALSE;
  26. }
  27. return TRUE;
  28. }
  29. BOOL
  30. IsapiFaxClose(
  31. LPEXTENSION_CONTROL_BLOCK Ecb
  32. )
  33. {
  34. PIFAX_GENERAL iFaxGeneral = (PIFAX_GENERAL) Ecb->lpbData;
  35. return FaxClose( iFaxGeneral->FaxHandle );
  36. }
  37. BOOL
  38. IsapiFaxGetVersion(
  39. LPEXTENSION_CONTROL_BLOCK Ecb
  40. )
  41. {
  42. PIFAX_GENERAL iFaxGeneral = (PIFAX_GENERAL) Ecb->lpbData;
  43. DWORD Version = 0;
  44. if (!FaxGetVersion( iFaxGeneral->FaxHandle, &Version )) {
  45. SendError( Ecb, GetLastError() );
  46. return FALSE;
  47. }
  48. SendResponseWithData( Ecb, (LPBYTE) &Version, sizeof(DWORD) );
  49. return TRUE;
  50. }