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.

146 lines
2.3 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. msystem.h
  5. Abstract:
  6. Prototypes functions encapsulating OS function. This essentially covers
  7. everything that is not in NET***.
  8. Author:
  9. Dan Hinsley (danhi) 10-Mar-1991
  10. Environment:
  11. User Mode - Win32
  12. Portable to any flat, 32-bit environment. (Uses Win32 typedefs.)
  13. Requires ANSI C extensions: slash-slash comments.
  14. Notes:
  15. Revision History:
  16. 26-Aug-1991 beng
  17. Separated from port1632.h
  18. --*/
  19. //
  20. // Constants
  21. //
  22. #define BIG_BUFFER_SIZE 4096
  23. //
  24. // Time support
  25. //
  26. typedef struct _DATETIME
  27. {
  28. UCHAR hours;
  29. UCHAR minutes;
  30. UCHAR seconds;
  31. UCHAR hundredths;
  32. UCHAR day;
  33. UCHAR month;
  34. WORD year;
  35. SHORT timezone;
  36. UCHAR weekday;
  37. }
  38. DATETIME, *PDATETIME;
  39. //
  40. // various memory allocation routines
  41. //
  42. LPTSTR
  43. GetBuffer(
  44. DWORD usSize
  45. );
  46. DWORD
  47. AllocMem(
  48. DWORD Size,
  49. PVOID * ppBuffer
  50. );
  51. DWORD
  52. ReallocMem(
  53. DWORD Size,
  54. PVOID *ppBuffer
  55. );
  56. DWORD
  57. FreeMem(
  58. PVOID pBuffer
  59. );
  60. //
  61. // clear Ansi and Unicode strings
  62. //
  63. VOID
  64. ClearStringW(
  65. LPWSTR lpszString
  66. );
  67. VOID
  68. ClearStringA(
  69. LPSTR lpszString
  70. );
  71. //
  72. // Console/text manipulation functions/macros
  73. //
  74. DWORD
  75. DosGetMessageW(
  76. IN LPTSTR *InsertionStrings,
  77. IN DWORD NumberofStrings,
  78. OUT LPTSTR Buffer,
  79. IN DWORD BufferLength,
  80. IN DWORD MessageId,
  81. IN LPTSTR FileName,
  82. OUT PDWORD pMessageLength
  83. );
  84. DWORD
  85. DosInsMessageW(
  86. IN LPTSTR *InsertionStrings,
  87. IN DWORD NumberofStrings,
  88. IN OUT LPTSTR InputMessage,
  89. IN DWORD InputMessageLength,
  90. OUT LPTSTR Buffer,
  91. IN DWORD BufferLength,
  92. OUT PDWORD pMessageLength
  93. );
  94. VOID
  95. DosPutMessageW(
  96. FILE *fp,
  97. LPWSTR pch,
  98. BOOL fPrintNL
  99. );
  100. int
  101. FindColumnWidthAndPrintHeader(
  102. int iStringLength,
  103. const DWORD HEADER_ID,
  104. const int TAB_DISTANCE
  105. );
  106. VOID
  107. PrintDependingOnLength(
  108. IN int iLength,
  109. IN LPTSTR OutputString
  110. );