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.

55 lines
1.9 KiB

  1. #ifndef __OS_H__
  2. #define __OS_H__
  3. namespace OS
  4. {
  5. enum { NT4 = 4 };
  6. bool unicodeOS();
  7. extern const bool unicodeOS_;
  8. extern const bool secureOS_;
  9. extern const int osVer_;
  10. LONG RegOpenKeyExW (HKEY hKey, LPCTSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult);
  11. LONG RegCreateKeyExW (HKEY hKey, LPCTSTR lpSubKey,DWORD Reserved, LPTSTR lpClass,DWORD dwOptions,REGSAM samDesired,LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition);
  12. LONG RegEnumKeyExW (HKEY hKey,DWORD dwIndex,LPTSTR lpName,LPDWORD lpcName,LPDWORD lpReserved,LPTSTR lpClass,LPDWORD lpcClass,PFILETIME lpftLastWriteTime);
  13. LONG RegDeleteKeyW (HKEY hKey, LPCTSTR lpSubKey);
  14. LONG RegQueryValueExW(
  15. HKEY hKey, // handle to key
  16. LPCTSTR lpValueName, // value name
  17. LPDWORD lpReserved, // reserved
  18. LPDWORD lpType, // type buffer
  19. LPBYTE lpData, // data buffer
  20. LPDWORD lpcbData // size of data buffer
  21. );
  22. LONG RegSetValueExW(
  23. HKEY hKey, // handle to key
  24. LPCTSTR lpValueName, // value name
  25. DWORD Reserved, // reserved
  26. DWORD dwType, // value type
  27. CONST BYTE *lpData, // value data
  28. DWORD cbData // size of value data
  29. );
  30. HRESULT CoImpersonateClient();
  31. BOOL GetProcessTimes(
  32. HANDLE hProcess, // handle to process
  33. LPFILETIME lpCreationTime, // process creation time
  34. LPFILETIME lpExitTime, // process exit time
  35. LPFILETIME lpKernelTime, // process kernel-mode time
  36. LPFILETIME lpUserTime // process user-mode time
  37. );
  38. HANDLE CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCWSTR lpName );
  39. HANDLE CreateMutexW(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bInitialOwner, LPCWSTR lpName );
  40. wchar_t ToUpper(wchar_t c);
  41. wchar_t ToLower(wchar_t c);
  42. bool wbem_iswdigit(wchar_t c);
  43. bool wbem_iswalnum (wchar_t c);
  44. };
  45. #endif