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.

118 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. unilib
  5. Abstract:
  6. Unidrv specific library functions
  7. Environment:
  8. Windows NT printer drivers
  9. Revision History:
  10. 10/15/96 -amandan-
  11. Created it.
  12. --*/
  13. #ifndef _UNILIB_H_
  14. #define _UNILIB_H_
  15. //
  16. // Alignment functions
  17. //
  18. WORD
  19. DwAlign2(
  20. IN PBYTE pubData);
  21. DWORD
  22. DwAlign4(
  23. IN PBYTE pubData);
  24. //
  25. // String handling function
  26. // Convert Unicode string to multi-byte string and vice versa
  27. //
  28. DWORD
  29. DwCopyStringToUnicodeString(
  30. IN UINT uiCodePage,
  31. IN PSTR pstrCharIn,
  32. OUT PWSTR pwstrCharOut,
  33. IN INT iwcOutSize);
  34. DWORD
  35. DwCopyUnicodeStringToString(
  36. IN UINT uiCodePage,
  37. IN PWSTR pwstrCharIn,
  38. OUT PSTR pstrCharOut,
  39. IN INT icbOutSize);
  40. //
  41. // CodePage and Character set handling functions
  42. //
  43. ULONG
  44. UlCharsetToCodePage(
  45. IN UINT uiCharSet);
  46. #ifdef KERNEL_MODE
  47. //
  48. // These are safer versions of iDrvPrintfA/W designed to prevent
  49. // buffer overflow. Only these safer versions should be used.
  50. //
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54. INT iDrvPrintfSafeA (
  55. IN PCHAR pszDest,
  56. IN CONST ULONG cchDest,
  57. IN CONST PCHAR pszFormat,
  58. IN ...);
  59. INT iDrvPrintfSafeW (
  60. IN PWCHAR pszDest,
  61. IN CONST ULONG cchDest,
  62. IN CONST PWCHAR pszFormat,
  63. IN ...);
  64. INT iDrvVPrintfSafeA (
  65. IN PCHAR pszDest,
  66. IN CONST ULONG cchDest,
  67. IN CONST PCHAR pszFormat,
  68. IN va_list arglist);
  69. INT iDrvVPrintfSafeW (
  70. IN PWCHAR pszDest,
  71. IN CONST ULONG cchDest,
  72. IN CONST PWCHAR pszFormat,
  73. IN va_list arglist);
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77. #endif //KERNEL_MODE
  78. //
  79. // Font installer font file directory
  80. // %SystemRoot%\system32\spool\drivers\unifont\
  81. //
  82. #define FONTDIR TEXT("\\unifont\\")
  83. #endif // !_UNILIB_H_