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.

117 lines
3.9 KiB

  1. /***************************************************************************
  2. Name : CAS.C
  3. Comment :
  4. Copyright (c) Microsoft Corp. 1991, 1992, 1993
  5. Revision Log
  6. Date Name Description
  7. -------- ----- ---------------------------------------------------------
  8. ***************************************************************************/
  9. #ifdef CAS
  10. // Copy of the DCX and PCX header from dcx.h in \wfw\efaxpump
  11. #define MAX_DCX_PAGES 1023
  12. typedef struct DCXHDR_s
  13. {
  14. DWORD id; // 4 byte integer =987654321
  15. DWORD Offset[MAX_DCX_PAGES+1];// array of 4 byte integers showing page offsets
  16. } DCXHDR;
  17. typedef struct PCXHDR_s
  18. {
  19. char id; // always = 0Ah
  20. char version; // value of 2 is suggested, higher allowed
  21. char encode_method; // always = 1
  22. char bitsperpixel; // =1 for fax mode transfer
  23. short xtopleft;
  24. short ytopleft;
  25. short width;
  26. short height;
  27. short hDPI;
  28. short vDPI;
  29. char pal[48];
  30. char reserv;
  31. char colorplanes; // must be 1 for fax mode
  32. short horiz;
  33. short nPaletteInfo; // palette info. must be 1
  34. char filler[58];
  35. } PCXHDR;
  36. /***------------------ Interface to CAS.C ------------------***/
  37. BOOL __export WINAPI CASModemFind(void);
  38. typedef BOOL (WINAPI *LPFN_CASMODEMFIND)(void);
  39. // returns TRUE if CAS is installed, FALSE if not
  40. VOID __export WINAPI CASInit(void);
  41. typedef BOOL (WINAPI *LPFN_CASINIT)(void);
  42. // init stuff, if any
  43. VOID __export WINAPI CASDeInit(void);
  44. typedef VOID (WINAPI *LPFN_CASDEINIT)(void);
  45. // if you want to down any shutdown-cleanup
  46. // (e.g. if there are pending receives, does CAS
  47. // save them for you across a reboot?)
  48. BOOL __export WINAPI CASSendFile(ATOM aPhone, ATOM aFileMG3, ATOM aFileIFX, ATOM aFileEFX, ATOM aFileDCX);
  49. typedef BOOL (WINAPI *LPFN_CASSENDFILE)(ATOM aPhone, ATOM aFileMG3, ATOM aFileIFX, ATOM aFileEFX, ATOM aFileDCX);
  50. // Send. Returns immediately with TRUE unless
  51. // some internal DEBUGCHK-like error or multiple
  52. // sends. Handles only one at a time & saves CAS handle
  53. // internally
  54. WORD __export WINAPI CASCheckSent(void);
  55. typedef WORD (WINAPI *LPFN_CASCHECKSENT)(void);
  56. // Checks if pending send (only one at any time), was sent.
  57. // Returns 0 if still pending, non-zero if done, with success/error.
  58. // The return value should be in LOBYTE=result HIBYTE=extended-error
  59. // form. See FILET30.H, line 29-38 for valid values/combinations.
  60. USHORT __export WINAPI CASGetNumReceived(void);
  61. typedef USHORT (WINAPI *LPFN_CASGETNUMRECEIVED)(void);
  62. // Get *number* of pending receives (successful or failure) only.
  63. // Don't actually dequeue any.
  64. DWORD __export WINAPI CASGetNextRecv(LPSTR szPath, LPSTR szFile);
  65. typedef DWORD (WINAPI *LPFN_CASGETNEXTRECV)(LPSTR szPath, LPSTR szFile);
  66. // gives the spool dir (recvd file in all forms _must_ be put
  67. // there for pump to get it) and a suggested filename (8.3 format)
  68. // which has been checked to be "safe" to create in that directory.
  69. // File name/extension can be changed as neccesary.
  70. // Return value must be a DWORD with the return filename atom
  71. // in LOWORD and result/extendederr in HIWORD (i.e result
  72. // is LOBYTE(HIWORD()) and exterr is HIBYTE(HIWORD()).
  73. // See lines 54--66 of FILET30.H for valid return values
  74. VOID __export WINAPI CASAbort(void);
  75. typedef VOID (WINAPI *LPFN_CASABORT)(void);
  76. // Abort current Send/Recv if possible.
  77. // Return when abort is **complete**. Can stub it out currently
  78. BOOL __export WINAPI CASSetAutoAnswer(BOOL fOn, USHORT uNumRings);
  79. typedef BOOL (WINAPI *LPFN_CASSETAUTOANSWER)(BOOL fOn, USHORT uNumRings);
  80. // fOn==TRUE--answer On, FALSE--answer Off
  81. // uNumRings == after X rings. (0 or more)
  82. BOOL __export WINAPI CASSetBC(LPBC lpbc, BCTYPE bctype);
  83. typedef BOOL (WINAPI *LPFN_CASSETBC)(LPBC lpbc, BCTYPE bctype);
  84. // Finally, we should also see if we can implement any of Mike
  85. // Ginsberg's INI settings on a CAS board.
  86. #endif // CAS