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.

127 lines
3.5 KiB

  1. #define IF32_LOCAL 0x0001
  2. #define IF32_DIRECTORY 0x0002
  3. #define IF32_LAST_ELEMENT 0x0004
  4. #ifndef CSC_RECORDMANAGER_WINNT
  5. #define _wtoupper(x) ( ( ((x)>='a')&&((x)<='z') ) ? ((x)-'a'+'A'):(x))
  6. #define _mytoupper(x) ( ( ((x)>='a')&&((x)<='z') ) ? ((x)-'a'+'A'):(x))
  7. #else
  8. #define _wtoupper(x) RtlUpcaseUnicodeChar(x)
  9. #define _mytoupper(x) RtlUpperChar(x)
  10. #endif
  11. // not to be used obsolete
  12. #define MakeNullPPath(p_ppath) p_ppath->pp_totalLength = 4; \
  13. p_ppath->pp_prefixLength = 4; \
  14. p_ppath->pp_elements[0].pe_length = 0
  15. int PUBLIC GetServerPart(LPPE lppeServer, USHORT *lpBuff, int cBuff);
  16. ULONG PUBLIC GetNextPathElement(LPPP lppp, ULONG indx,USHORT *lpBuff, ULONG cBuff);
  17. VOID PUBLIC GetLeafPtr(LPPATH lpPath, USHORT *lpBuff, ULONG cBuff);
  18. VOID PUBLIC BreakPath(LPPP lppp, ULONG indx, USHORT *pusSav);
  19. VOID PUBLIC MendPath(LPPP lppp, ULONG indx, USHORT *pusSav);
  20. int PUBLIC HexToA(ULONG ulHex, LPSTR lpBuff, int count);
  21. ULONG PUBLIC AtoHex(LPSTR lpBuff, int count);
  22. int wstrnicmp(const USHORT *, const USHORT *, ULONG);
  23. //int strnicmp(const char *, const char *, ULONG);
  24. ULONG strmcpy(LPSTR, LPSTR, ULONG);
  25. int PpeToSvr(LPPE, LPSTR, int, ULONG);
  26. ULONG wstrlen(USHORT *lpuStr);
  27. int DosToWin32FileSize(ULONG, int *, int *);
  28. int Win32ToDosFileSize(int, int, ULONG *);
  29. int CompareTimes(_FILETIME, _FILETIME);
  30. int CompareSize(long nHighDst, long nLowDst, long nHighSrc, long nLowSrc);
  31. void InitFind32FromIoreq (PIOREQ, LPFIND32, ULONG uFlags);
  32. void InitFind32Names(LPFIND32, USHORT * , USHORT *);
  33. void InitIoreqFromFind32 (LPFIND32, PIOREQ);
  34. void Find32ToSearchEntry(LPFIND32 lpFind32, srch_entry *pse);
  35. void PUBLIC Find32AFromFind32(LPFIND32A, LPFIND32, int);
  36. void PUBLIC Find32FromFind32A(LPFIND32, LPFIND32A, int);
  37. void AddPathElement(path_t, string_t, int);
  38. void MakePPath(path_t, LPBYTE);
  39. void MakePPathW(path_t, USHORT *);
  40. void DeleteLastElement(path_t);
  41. int ResNameCmp(LPPE, LPPE);
  42. int Conv83ToFcb(LPSTR lp83Name, LPSTR lpFcbName);
  43. int Conv83UniToFcbUni(USHORT *, USHORT *);
  44. void FileRootInfo(LPFIND32);
  45. BOOL FHasWildcard(USHORT *lpuName, int cMax);
  46. LPSTR mystrpbrk(LPSTR, LPSTR);
  47. LPWSTR
  48. wstrpbrk(
  49. LPWSTR lpSrc,
  50. LPWSTR lpDelim
  51. );
  52. int OfflineToOnlinePath(path_t ppath);
  53. int OnlineToOfflinePath(path_t ppath);
  54. BOOL IsOfflinePE(LPPE lppp);
  55. int OnlineToOfflinePE(LPPE lppp);
  56. int OfflineToOnlinePE(LPPE lppp);
  57. BOOL IsOfflineUni(USHORT *lpuName);
  58. int OnlineToOfflineUni(USHORT *lpuName, ULONG size);
  59. int OfflineToOnlineUni(USHORT *lpuName, ULONG size);
  60. LPVOID mymemmove(LPVOID lpDst, LPVOID lpSrc, ULONG size);
  61. int GetDriveIndex(LPSTR lpDrive);
  62. //prototypes added to remove NT compile warn/errors
  63. void FillRootInfo(
  64. LPFIND32 lpFind32
  65. );
  66. int CompareTimesAtDosTimePrecision( _FILETIME ftDst,
  67. _FILETIME ftSrc
  68. );
  69. int ReadInitValues();
  70. BOOL
  71. HasHeuristicTypeExtensions(
  72. USHORT *lpwzFileName
  73. );
  74. VOID
  75. IncrementFileTime(
  76. _FILETIME *lpft
  77. );
  78. int
  79. IncrementTime(
  80. LPFILETIME lpFt,
  81. int secs
  82. );
  83. #ifndef CSC_RECORDMANAGER_WINNT
  84. int mystrnicmp(
  85. const char *pStr1,
  86. const char *pStr2,
  87. unsigned count
  88. );
  89. #else
  90. _CRTIMP int __cdecl mystrnicmp(
  91. const char *pStr1,
  92. const char *pStr2,
  93. size_t count
  94. );
  95. #endif //ifndef CSC_RECORDMANAGER_WINNT
  96. BOOL
  97. CreateStringArrayFromDelimitedList(
  98. IN LPWSTR lpwzDelimitedList,
  99. IN LPWSTR lpwzDelimiters,
  100. IN LPWSTR *lprgwzStringArray,
  101. OUT LPDWORD lpdwCount
  102. );
  103. BOOL
  104. DeleteDirectoryFiles(
  105. LPCSTR lpszDir
  106. );