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.

154 lines
6.2 KiB

  1. /* Copyright Microsoft Corp 1993
  2. *
  3. * faxopt.c
  4. *
  5. * Include file for faxopt.dll
  6. *
  7. *
  8. * Created: 1/10/93
  9. * Author: mikegins
  10. */
  11. #ifndef __FAXOPT_H__
  12. #define __FAXOPT_H__ 1
  13. #ifndef __FAXSEC_H__
  14. #define SEC_SUCCESS 0 /* Operation succeeded */
  15. #define SEC_BADFILE 1 /* File cannot be opened */
  16. #define SEC_KEYTOOSMALL 2 /* Keybuffer too small */
  17. #define SEC_NOMATCH 3 /* No key of requested type found for
  18. specified keyholder, or too many matches
  19. were found (ie: joe@+123 and mart@+123 both
  20. match @+123 with equal weight */
  21. #define SEC_FILECORRUPT 4 /* File integrity check failed */
  22. #define SEC_NOMEMORY 5 /* Aborted due to low memory conditions */
  23. #define SEC_BADPTR 6 /* An invalid pointer was passed in */
  24. #define SEC_USERABORT 7 /* User aborted operation */
  25. #define SEC_BADPASS 8 /* Invalid password */
  26. #define SEC_ABORT 9 /* Callback caused abort */
  27. #define SEC_BUSY 10 /* Concurrent job already running */
  28. #define SEC_WRONGKEY 11 /* Wrong key used in decryption */
  29. #define SEC_NEWERVERSION 12 /* File generated by newer version of software,
  30. and we cannot decrypt it */
  31. #define SIG_SUCCESS 0 /* Operation succeeded */
  32. #define SIG_BADINFILE 1 /* Bad input file */
  33. #define SIG_BADOUTFILE 2 /* Bad output file */
  34. #define SIG_FORGED 3 /* Signature does not match keyset */
  35. #define SIG_AUTHENTIC 4 /* Signature matches keyset */
  36. #define SIG_NOTVERIFIED 5 /* No key found, so can not verify signature */
  37. #define SIG_BADPASS 6 /* Bad password or incorrect session handle */
  38. #define SIG_NOMEM 7 /* Out of memory error */
  39. #define SIG_ABORT 8 /* Callback caused abort */
  40. #define SIG_BUSY 9 /* Concurrent job already running */
  41. #endif
  42. #define FAXOPTBASEATT 0x6000
  43. #define iATTlogostr (FAXOPTBASEATT+ 0)
  44. #define iATTlogo1 (FAXOPTBASEATT+ 1)
  45. #define iATTlogo2 (FAXOPTBASEATT+ 2)
  46. #define iATTlogo3 (FAXOPTBASEATT+ 3)
  47. #define iATTlogo4 (FAXOPTBASEATT+ 4)
  48. #define iATTlogo5 (FAXOPTBASEATT+ 5)
  49. #define iATTinccover (FAXOPTBASEATT+ 6)
  50. #define iATTtranshour (FAXOPTBASEATT+ 7)
  51. #define iATTtransquart (FAXOPTBASEATT+ 8)
  52. #define iATTdelivform (FAXOPTBASEATT+ 9)
  53. #define iATTimagequal (FAXOPTBASEATT+10)
  54. #define iATTprintorient (FAXOPTBASEATT+11)
  55. #define iATTcheapbeghr (FAXOPTBASEATT+13)
  56. #define iATTcheapendhr (FAXOPTBASEATT+14)
  57. #define iATTcheapbegq (FAXOPTBASEATT+15)
  58. #define iATTcheapendq (FAXOPTBASEATT+16)
  59. #define iATTnumret (FAXOPTBASEATT+17)
  60. #define iATTminbetret (FAXOPTBASEATT+18)
  61. #define iATTpapersize (FAXOPTBASEATT+19)
  62. #define iATTtransprio (FAXOPTBASEATT+20)
  63. #define iATTencrypt (FAXOPTBASEATT+21)
  64. #define iATTsign (FAXOPTBASEATT+22)
  65. #define iATTIncludeBody (FAXOPTBASEATT+23)
  66. #define iATTSimplePwd (FAXOPTBASEATT+24)
  67. #define SelectUser Func20
  68. WORD FAR PASCAL SelectUser(LPSTR userid, DWORD userinst, LPSTR olduser,
  69. LPSTR selecteduser);
  70. #define GetSimplePwd Func21
  71. WORD FAR PASCAL GetSimplePwd(LPSTR pwd);
  72. #define ImportKeysDlg Func22
  73. WORD FAR PASCAL ImportKeysDlg(LPSTR filename, HWND hDlg);
  74. /* 0 = success, 1 = End of Job, 2 = failure */
  75. typedef WORD FAR PASCAL ReadCB(DWORD hf, LPBUFFER FAR *buf);
  76. typedef WORD FAR PASCAL WriteCB(DWORD hf, LPBUFFER buf);
  77. typedef void FAR PASCAL LogCB(LPSTR userid, DWORD userinst);
  78. /* 0 = continue, 1 = abort */
  79. typedef WORD FAR PASCAL SigCB(DWORD hf, LPSTR username, WORD result);
  80. #if FALSE
  81. #define MailStarting Func00
  82. void FAR PASCAL MailStarting(LogCB *LoginCB, LogCB *LogoutCB, LPSTR userid);
  83. #define MailShutdown Func01
  84. void FAR PASCAL MailShutdown(void);
  85. #define EncryptInit Func02
  86. WORD FAR PASCAL EncryptInit(LPSTR userid, DWORD userinst, LPSTR destuser,
  87. WORD FAR *instance, LPBUFFER buf);
  88. #define EncryptData Func03
  89. WORD FAR PASCAL EncryptData(DWORD userinst, WORD inst, LPBUFFER buf);
  90. #define DecryptInit Func04
  91. WORD FAR PASCAL DecryptInit(LPSTR userid, DWORD userinst, LPSTR srcuser,
  92. WORD FAR *instance, LPBUFFER buf);
  93. #define DecryptData Func05
  94. WORD FAR PASCAL DecryptData(DWORD userinst, WORD inst, LPBUFFER buf);
  95. #define SimpleEncryptInit Func06
  96. WORD FAR PASCAL SimpleEncryptInit(LPSTR pwd, WORD FAR *instance, LPBUFFER buf);
  97. #define SimpleEncryptData Func07
  98. WORD FAR PASCAL SimpleEncryptData(WORD inst, LPBUFFER buf);
  99. #define SimpleDecryptInit Func08
  100. WORD FAR PASCAL SimpleDecryptInit(LPSTR pwd, WORD FAR *instance, LPBUFFER buf);
  101. #define SimpleDecryptData Func09
  102. WORD FAR PASCAL SimpleDecryptData(WORD inst, LPBUFFER buf);
  103. #ifndef DELRINA
  104. #define SignFile Func10
  105. #endif
  106. WORD FAR PASCAL SignFile(ReadCB *readCB, DWORD readHand, WriteCB *writeCB,
  107. DWORD writeHand, LPSTR userid, DWORD userinst,
  108. LPSTR filename, WORD FAR *HeaderSize);
  109. #define UnSignFile Func11
  110. WORD FAR PASCAL UnSignFile(ReadCB FAR *readCB, DWORD readHand,
  111. WriteCB FAR *writeCB,DWORD writeHand);
  112. #ifndef DELRINA
  113. #define ExistsPubKey Func12
  114. #endif
  115. BOOL FAR PASCAL ExistsPubKey(LPSTR name);
  116. #define IsUserLoggedIn Func13
  117. WORD FAR PASCAL IsUserLoggedIn(void);
  118. #define SignFileHeaderSize Func14
  119. WORD FAR PASCAL SignFileHeaderSize(ReadCB FAR *readCB, DWORD readHand,
  120. WORD FAR *headersize, LPSTR filename);
  121. #define GetSignatures Func15
  122. WORD FAR PASCAL GetSignatures(ReadCB FAR *readCB, DWORD readHand,
  123. SigCB FAR *sigCB, DWORD sigHand, LPSTR filename);
  124. /* Call to start hashing bft header. Returns 0 for failure, or non-zero
  125. context for passing to SendBFTHash and DoneBFTHash */
  126. #define StartBFTHash Func23
  127. WORD FAR PASCAL StartBFTHash(void);
  128. /* Pass in context from StartBFTHash, and buffer with length */
  129. #define SendBFTHash Func24
  130. void FAR PASCAL SendBFTHash(WORD Context, BYTE FAR *buf, WORD len);
  131. /* Pass in context after done calling SendBFTHash. If salt points to 3 bytes
  132. which are 0, a salt is generated and returned, else the salt is used.
  133. Key must be 5 bytes, from which the actual key is derived. Res must be 16
  134. bytes long to receive hashed encrypted result. */
  135. #define DoneBFTHash Func25
  136. void FAR PASCAL DoneBFTHash(WORD Context, BYTE FAR *salt, BYTE FAR *key,
  137. BYTE FAR *res);
  138. #endif
  139. #endif