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.

40 lines
1.3 KiB

  1. //////////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // utils.h
  4. //
  5. // This file contains most commonly used string operation. ALl the setup project should link here
  6. // or add the common utility here to avoid duplicating code everywhere or using CRT runtime.
  7. //
  8. // Created 4\15\997 inateeg
  9. //
  10. ///////////////////////////////////////////////////////////////////////////////////////////////////
  11. #ifndef _UTILS_H_
  12. #define _UTILS_H_
  13. #define IsSpace(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n' || (c) == '\v' || (c) == '\f')
  14. #define IsDigit(c) ((c) >= '0' && (c) <= '9')
  15. #define IsAlpha(c) ( ((c) >= 'A' && (c) <= 'Z') || ((c) >= 'a' && (c) <= 'z'))
  16. BOOL PathRemoveFileSpec(LPTSTR pFile);
  17. LPTSTR PathFindFileName(LPCTSTR pPath);
  18. BOOL PathIsUNC(LPCTSTR pszPath);
  19. int PathGetDriveNumber(LPCTSTR lpsz);
  20. BOOL PathIsUNCServer(LPCTSTR pszPath);
  21. BOOL PathIsDirectory(LPCTSTR pszPath);
  22. BOOL PathIsRoot(LPCTSTR pPath);
  23. LPTSTR PathRemoveBackslash( LPTSTR lpszPath );
  24. BOOL PathIsPrefix( LPCTSTR pszPrefix, LPCTSTR pszPath);
  25. DWORD
  26. SDSQueryValueExA(
  27. IN HKEY hkey,
  28. IN LPCSTR pszValue,
  29. IN LPDWORD lpReserved,
  30. OUT LPDWORD pdwType,
  31. OUT LPVOID pvData,
  32. IN OUT LPDWORD pcbData);
  33. #endif // _UTILS_H_