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.

106 lines
3.1 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : faxdrv16.h //
  3. // //
  4. // DESCRIPTION : //
  5. // //
  6. // AUTHOR : DanL. //
  7. // //
  8. // HISTORY : //
  9. // Oct 19 1999 DannyL Creation. //
  10. // //
  11. // Copyright (C) 1999 Microsoft Corporation All Rights Reserved //
  12. /////////////////////////////////////////////////////////////////////////////
  13. #ifndef __FAXDRV__FAXDRV16_H
  14. #define __FAXDRV__FAXDRV16_H
  15. #define MAX_LENGTH_CAPTION 30 //GetOpenFileName dialog caption
  16. #define MAX_LENGTH_PRINT_TO_FILE_FILTERS 40 //GetOpenFileName dialog filtes
  17. #define MAX_LENGTH_STRING MAX_PATH
  18. #define BUF_CHUNK 32768
  19. #define CB_LANDSCAPE 0x0001
  20. #define DW_WIDTHBYTES(bits) (((bits)+31)/32*4)
  21. #define LPDV_DEFINED
  22. //
  23. // documented part of UNIDRV.DLL's PDEVICE
  24. //
  25. typedef struct
  26. {
  27. short iType;
  28. short oBruteHdr;
  29. HANDLE hMd;
  30. LPSTR lpMd;
  31. } PDEVICE, FAR * LPDV;
  32. //
  33. // private data for DUMP callback.
  34. //
  35. typedef struct
  36. {
  37. DWORD dwScanBufSize;
  38. DWORD dwTotalScanBytes;
  39. DWORD dwTotalScans;
  40. WORD wWidthBytes;
  41. HANDLE hScanBuf;
  42. char _huge *lpScanBuf;
  43. WORD wHdrSize;
  44. HDC hAppDC;
  45. DWORD dwPointer;
  46. } EXTPDEV, FAR *LPEXTPDEV;
  47. //
  48. // Copy a scan line to the global scan buffer.
  49. //
  50. short FAR PASCAL BlockOut(LPDV, LPSTR, WORD);
  51. //
  52. // Gets band blocks from GDI and dump them.
  53. //
  54. short FAR PASCAL fnDump(LPDV, LPPOINT, WORD);
  55. //
  56. // Win Proc for the User Info property page.
  57. //
  58. UINT CALLBACK UserInfoProc(
  59. HWND hwnd,
  60. UINT uMsg,
  61. LPPROPSHEETPAGE ppsp
  62. );
  63. //
  64. // Handle GDI control messages.
  65. //
  66. short WINAPI Control(LPDV lpdv,WORD function,LPSTR lpInData,LPSTR lpOutData);
  67. /*
  68. - StringReplace
  69. -
  70. * Purpose:
  71. * Replace occurances of one character by another in an input string.
  72. * This function is destructive of the input string.
  73. *
  74. * Arguments:
  75. * [in][out] sz - Manipulated string.
  76. * [in] src - Character to be replaced.
  77. * [in] dst - Character to replace to.
  78. *
  79. * Returns:
  80. * LPSTR Address of resulted string.
  81. *
  82. * Remarks:
  83. * Used primarily to replace occurances of \n by \0 in the string resource
  84. * for the file filters of the Print To File dialog box.
  85. */
  86. __inline LPSTR
  87. StringReplace(LPSTR sz,char src,char dst)
  88. {
  89. LPSTR szRet = sz;
  90. for (;*sz != 0; sz++)
  91. {
  92. if (*sz == src)
  93. {
  94. *sz = dst;
  95. }
  96. }
  97. return szRet;
  98. }
  99. #endif //__FAXDRV__FAXDRV16_H