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.

173 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1996-2003 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. local.h
  6. Abstract:
  7. DDK version of local.h
  8. Environment:
  9. User Mode -Win32
  10. Revision History:
  11. --*/
  12. // @@BEGIN_DDKSPLIT
  13. #ifdef INTERNAL
  14. #include "splcom.h"
  15. #endif
  16. // @@END_DDKSPLIT
  17. #define READTHREADTIMEOUT 5000
  18. #define READ_THREAD_EOJ_TIMEOUT 60000 // 1 min
  19. #define READ_THREAD_ERROR_WAITTIME 5000 // 5 sec
  20. #define READ_THREAD_IDLE_WAITTIME 30000 // 30 sec
  21. #define ALL_JOBS 0xFFFFFFFF
  22. // ---------------------------------------------------------------------
  23. // EXTERN VARIABLES
  24. // ---------------------------------------------------------------------
  25. extern HANDLE hInst;
  26. extern DWORD dwReadThreadErrorTimeout;
  27. extern DWORD dwReadThreadEOJTimeout;
  28. extern DWORD dwReadThreadIdleTimeoutOther;
  29. extern CRITICAL_SECTION pjlMonSection;
  30. extern DWORD SplDbgLevel;
  31. // ---------------------------------------------------------------------
  32. // FUNCTION PROTOTYPE
  33. // ---------------------------------------------------------------------
  34. VOID
  35. EnterSplSem(
  36. VOID
  37. );
  38. VOID
  39. LeaveSplSem(
  40. VOID
  41. );
  42. VOID
  43. SplInSem(
  44. VOID
  45. );
  46. VOID
  47. SplOutSem(
  48. VOID
  49. );
  50. DWORD
  51. UpdateTimeoutsFromRegistry(
  52. IN LPTSTR pszRegistryRoot
  53. );
  54. PINIPORT
  55. FindIniPort(
  56. IN LPTSTR pszName
  57. );
  58. PINIPORT
  59. CreatePortEntry(
  60. IN LPTSTR pszPortName
  61. );
  62. VOID
  63. DeletePortEntry(
  64. IN PINIPORT pIniPort
  65. );
  66. VOID
  67. FreeIniJobs(
  68. PINIPORT pIniPort
  69. );
  70. VOID
  71. SendJobLastPageEjected(
  72. PINIPORT pIniPort,
  73. DWORD dwValue,
  74. BOOL bTime
  75. );
  76. VOID
  77. FreeIniJob(
  78. IN OUT PINIJOB pIniJob
  79. );
  80. // @@BEGIN_DDKSPLIT
  81. // ---------------------------------------------------------------------
  82. // UNICODE TO ANSI MACRO
  83. // ??? !!! we should get rid of these sooner or later
  84. // ---------------------------------------------------------------------
  85. // @@END_DDKSPLIT
  86. #include <string.h>
  87. #include <stdlib.h>
  88. #include <stdio.h>
  89. LPSTR
  90. mystrstr(
  91. LPSTR cs,
  92. LPSTR ct
  93. );
  94. LPSTR
  95. mystrrchr(
  96. LPSTR cs,
  97. char c
  98. );
  99. LPSTR
  100. mystrchr(
  101. LPSTR cs,
  102. char c
  103. );
  104. int
  105. mystrncmp(
  106. LPSTR cs,
  107. LPSTR ct,
  108. int n
  109. );
  110. // @@BEGIN_DDKSPLIT
  111. #ifndef INTERNAL
  112. // @@END_DDKSPLIT
  113. extern CRITICAL_SECTION pjlMonSection;
  114. LPWSTR AllocSplStr(LPWSTR pStr);
  115. LPVOID AllocSplMem(DWORD cbAlloc);
  116. #define FreeSplMem( pMem ) (GlobalFree( pMem ) ? FALSE:TRUE)
  117. #define FreeSplStr( lpStr ) ((lpStr) ? (GlobalFree(lpStr) ? FALSE:TRUE):TRUE)
  118. // @@BEGIN_DDKSPLIT
  119. #endif
  120. // @@END_DDKSPLIT
  121. //
  122. // Needed by DDK
  123. //
  124. // @@BEGIN_DDKSPLIT
  125. /*
  126. // @@END_DDKSPLIT
  127. #define DBGMSG(x,y)
  128. #define SPLASSERT(exp)
  129. #define COUNTOF(x) (sizeof(x)/sizeof *(x))
  130. // @@BEGIN_DDKSPLIT
  131. */
  132. // @@END_DDKSPLIT