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.

167 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1993/4 Microsoft Corporation
  3. Module Name:
  4. procs.c
  5. Abstract:
  6. Common header file for routines which support 16 bit
  7. applications.
  8. Author:
  9. Colin Watson (colinw) 21-Nov-1993
  10. Environment:
  11. Revision History:
  12. --*/
  13. #ifndef DBG
  14. #define DBG 0
  15. #endif
  16. #if !DBG
  17. #undef NWDBG
  18. #endif
  19. #define UNICODE
  20. #include <stdlib.h>
  21. #include <nt.h>
  22. #include <ntrtl.h>
  23. #include <nturtl.h>
  24. #include <windows.h>
  25. #include <string.h> // strcmp
  26. #include <stdio.h>
  27. #include <stdarg.h>
  28. #include <debugfmt.h> // FORMAT_LPSTR
  29. #include <nwapi.h>
  30. #include <nwxchg.h>
  31. #include <ntddnwfs.h>
  32. #include <npapi.h>
  33. #include <nwrnames.h>
  34. #include <vddsvc.h>
  35. #include <nwdos.h>
  36. #include <ncp.h>
  37. #define IDS_CLIENT_ID_STRING 1
  38. #define IDS_CLIENT_ID_STRING_NEC98 2
  39. // Locks.c
  40. VOID
  41. Locks(
  42. USHORT Command
  43. );
  44. VOID
  45. InitLocks(
  46. VOID
  47. );
  48. VOID
  49. ResetLocks(
  50. VOID
  51. );
  52. // Ncp.c
  53. extern PNWDOSTABLE pNwDosTable;
  54. extern HANDLE ServerHandles[MC];
  55. CONN_INDEX
  56. SelectConnection(
  57. VOID
  58. );
  59. CONN_INDEX
  60. SelectConnectionInCWD(
  61. VOID
  62. );
  63. NTSTATUS
  64. OpenConnection(
  65. CONN_INDEX Connection
  66. );
  67. ULONG
  68. GetDirectoryHandle2(
  69. DWORD Drive
  70. );
  71. #define GET_NT_HANDLE() (HANDLE)(pNwDosTable->NtHandleHi << 16 | pNwDosTable->NtHandleLow)
  72. #define GET_NT_SRCHANDLE() (HANDLE)(pNwDosTable->NtHandleSrcHi << 16 | pNwDosTable->NtHandleSrcLow)
  73. //
  74. // MSW_PE: Machine Status Word Protect-mode enable bit
  75. //
  76. #ifndef MSW_PE
  77. #define MSW_PE 0x0001
  78. #endif
  79. #undef getMSW
  80. extern WORD getMSW(VOID);
  81. #define IS_PROTECT_MODE() (UCHAR)((getMSW() & MSW_PE)? TRUE : FALSE)
  82. #if NWDBG
  83. #define NwPrint(String) NwPrintf String;
  84. VOID
  85. DebugControl(
  86. int Command
  87. );
  88. VOID
  89. NwPrintf(
  90. char *Format,
  91. ...
  92. );
  93. VOID
  94. VrDumpRealMode16BitRegisters(
  95. IN BOOL DebugStyle
  96. );
  97. VOID
  98. VrDumpNwData(
  99. VOID
  100. );
  101. VOID
  102. DisplayExtendedError(
  103. VOID
  104. );
  105. VOID
  106. FormattedDump(
  107. PCHAR far_p,
  108. LONG len
  109. );
  110. #else
  111. #define NwPrint(_x_)
  112. #define VrDumpRealMode16BitRegisters(_x_)
  113. #define VrDumpNwData( )
  114. #define DisplayExtendedError( )
  115. #define FormattedDump(_x_,_y_)
  116. #endif