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.

120 lines
2.1 KiB

  1. /*****************************************************************************\
  2. * MODULE: util.h
  3. *
  4. * Private header for the Print-Processor library.
  5. *
  6. *
  7. * Copyright (C) 1996-1997 Microsoft Corporation
  8. * Copyright (C) 1996-1997 Hewlett Packard
  9. *
  10. * History:
  11. * 07-Oct-1996 HWP-Guys Initiated port from win95 to winNT
  12. *
  13. \*****************************************************************************/
  14. #ifndef _UTIL_H
  15. #define _UTIL_H
  16. // Constants defined.
  17. //
  18. #define PRINT_LEVEL_0 0
  19. #define PRINT_LEVEL_1 1
  20. #define PRINT_LEVEL_2 2
  21. #define PRINT_LEVEL_3 3
  22. #define PRINT_LEVEL_4 4
  23. #define PRINT_LEVEL_5 5
  24. #define PORT_LEVEL_1 1
  25. #define PORT_LEVEL_2 2
  26. #define COMPUTER_MAX_NAME 32
  27. // Utility Routines.
  28. //
  29. PCINETMONPORT utlValidatePrinterHandle(
  30. HANDLE hPrinter);
  31. PCINETMONPORT utlValidatePrinterHandleForClose(
  32. HANDLE hPrinter,
  33. PBOOL pbDeletePending);
  34. #ifdef WINNT32
  35. LPTSTR utlValidateXcvPrinterHandle(
  36. HANDLE hPrinter);
  37. #endif
  38. BOOL utlParseHostShare(
  39. LPCTSTR lpszPortName,
  40. LPTSTR *lpszHost,
  41. LPTSTR *lpszShare,
  42. LPINTERNET_PORT lpPort,
  43. LPBOOL lpbHTTPS);
  44. int utlStrSize(
  45. LPCTSTR lpszStr);
  46. LPBYTE utlPackStrings(
  47. LPTSTR *pSource,
  48. LPBYTE pDest,
  49. LPDWORD pDestOffsets,
  50. LPBYTE pEnd);
  51. LPTSTR utlStrChr(
  52. LPCTSTR cs,
  53. TCHAR c);
  54. LPTSTR utlStrChrR(
  55. LPCTSTR cs,
  56. TCHAR c);
  57. LPTSTR utlRegGetVal(
  58. HKEY hKey,
  59. LPCTSTR lpszKey);
  60. // ----------------------------------------------------------------------
  61. //
  62. // Impersonation utilities
  63. //
  64. // ----------------------------------------------------------------------
  65. #ifdef WINNT32
  66. BOOL
  67. MyUNCName(
  68. LPTSTR pNameStart
  69. );
  70. BOOL MyName(
  71. LPCTSTR pName
  72. );
  73. #endif
  74. BOOL MyServer(
  75. LPCTSTR pName
  76. );
  77. // ---------------------------------------------------------------------
  78. //
  79. // Useful Macros
  80. //
  81. // ---------------------------------------------------------------------
  82. #if (defined(WINNT32))
  83. #define WIN9X_INLINE
  84. #else
  85. #define WIN9X_INLINE _inline
  86. #endif
  87. LPTSTR
  88. GetUserName(VOID);
  89. VOID
  90. EndBrowserSession (
  91. VOID);
  92. #endif