Windows NT 4.0 source code leak
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.

199 lines
2.9 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. local.h
  5. Abstract:
  6. Header file for Local Print Providor
  7. Author:
  8. Dave Snipp (DaveSn) 15-Mar-1991
  9. Revision History:
  10. --*/
  11. extern HANDLE hInst;
  12. extern HANDLE hHeap;
  13. extern HANDLE HeapSemaphore;
  14. extern HANDLE InitSemaphore;
  15. extern CRITICAL_SECTION SpoolerSection;
  16. extern DWORD PortInfo1Strings[];
  17. extern DWORD PortInfo2Strings[];
  18. extern WCHAR szFILE[];
  19. extern WCHAR szCOM[];
  20. extern WCHAR szLPT[];
  21. #define IDS_LOCALMONITOR 300
  22. #define IDS_INVALIDPORTNAME_S 301
  23. #define IDS_PORTALREADYEXISTS_S 302
  24. #define IDS_NOTHING_TO_CONFIGURE 303
  25. #define IDS_COULD_NOT_OPEN_FILE 304
  26. #define IDS_UNKNOWN_ERROR 305
  27. #define IDS_OVERWRITE_EXISTING_FILE 306
  28. #define IDS_LOCALMONITORNAME 307
  29. #define MSG_ERROR MB_OK | MB_ICONSTOP
  30. #define MSG_WARNING MB_OK | MB_ICONEXCLAMATION
  31. #define MSG_YESNO MB_YESNO | MB_ICONQUESTION
  32. #define MSG_INFORMATION MB_OK | MB_ICONINFORMATION
  33. #define MSG_CONFIRMATION MB_OKCANCEL | MB_ICONEXCLAMATION
  34. #define TIMEOUT_MIN 1
  35. #define TIMEOUT_MAX 999999
  36. #define TIMEOUT_STRING_MAX 6
  37. #define WITHINRANGE( val, lo, hi ) \
  38. ( ( val <= hi ) && ( val >= lo ) )
  39. #define IS_FILE_PORT(pName) \
  40. !wcsicmp( pName, szFILE )
  41. #define IS_COM_PORT(pName) \
  42. IsCOMPort( pName )
  43. #define IS_LPT_PORT(pName) \
  44. IsLPTPort( pName )
  45. BOOL
  46. IsCOMPort(
  47. LPWSTR pPort
  48. );
  49. BOOL
  50. IsLPTPort(
  51. LPWSTR pPort
  52. );
  53. BOOL APIENTRY
  54. PortNameDlg(
  55. HWND hwnd,
  56. WORD msg,
  57. WPARAM wparam,
  58. LPARAM lparam
  59. );
  60. BOOL APIENTRY
  61. ConfigureLPTPortDlg(
  62. HWND hwnd,
  63. WORD msg,
  64. WPARAM wparam,
  65. LPARAM lparam
  66. );
  67. BOOL APIENTRY
  68. PrintToFileDlg(
  69. HWND hwnd,
  70. WORD msg,
  71. WPARAM wparam,
  72. LPARAM lparam
  73. );
  74. VOID
  75. EnterSplSem(
  76. VOID
  77. );
  78. VOID
  79. LeaveSplSem(
  80. VOID
  81. );
  82. VOID
  83. SplOutSem(
  84. VOID
  85. );
  86. LPVOID
  87. AllocSplMem(
  88. DWORD cb
  89. );
  90. BOOL
  91. FreeSplMem(
  92. LPVOID pMem,
  93. DWORD cb
  94. );
  95. LPVOID
  96. ReallocSplMem(
  97. LPVOID lpOldMem,
  98. DWORD cbOld,
  99. DWORD cbNew
  100. );
  101. LPWSTR
  102. AllocSplStr(
  103. LPWSTR lpStr
  104. );
  105. BOOL
  106. FreeSplStr(
  107. LPWSTR lpStr
  108. );
  109. BOOL
  110. ReallocSplStr(
  111. LPWSTR *plpStr,
  112. LPWSTR lpStr
  113. );
  114. PINIENTRY
  115. FindName(
  116. PINIENTRY pIniKey,
  117. LPWSTR pName
  118. );
  119. PINIENTRY
  120. FindIniKey(
  121. PINIENTRY pIniEntry,
  122. LPWSTR lpName
  123. );
  124. LPBYTE
  125. PackStrings(
  126. LPWSTR *pSource,
  127. LPBYTE pDest,
  128. DWORD *DestOffsets,
  129. LPBYTE pEnd
  130. );
  131. int
  132. Message(
  133. HWND hwnd,
  134. DWORD Type,
  135. int CaptionID,
  136. int TextID,
  137. ...
  138. );
  139. DWORD
  140. ReportError(
  141. HWND hwndParent,
  142. DWORD idTitle,
  143. DWORD idDefaultError
  144. );
  145. BOOL
  146. MakeLink(
  147. LPWSTR pOldDosDeviceName,
  148. LPWSTR pNewDosDeviceName,
  149. LPWSTR *ppOldNtDeviceName,
  150. LPWSTR pNewNtDeviceName,
  151. SECURITY_DESCRIPTOR *pSecurityDescriptor
  152. );
  153. BOOL
  154. RemoveLink(
  155. LPWSTR pOldDosDeviceName,
  156. LPWSTR pNewDosDeviceName,
  157. LPWSTR *ppOldNtDeviceName
  158. );