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.

105 lines
2.9 KiB

  1. //=======================================================================
  2. //
  3. // Copyright (c) 1998-2000 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // File: osdet.h
  6. //
  7. // Description:
  8. //
  9. // IU Platform and language detection
  10. //
  11. //=======================================================================
  12. #ifndef __IU_OSDET_INC__
  13. #define __IU_OSDET_INC__
  14. #include <oleauto.h>
  15. #include <wininet.h> // for INTERNET_MAX_URL_LENGTH
  16. extern HINSTANCE g_hinst;
  17. typedef struct _IU_DRIVEINFO
  18. {
  19. //
  20. // Drive strings are of the form "C:\" so will always be 4 TCHARs (including NULL)
  21. //
  22. TCHAR szDriveStr[4];
  23. INT iKBytes;
  24. } IU_DRIVEINFO, * PIU_DRIVEINFO, ** PPIU_DRIVEINFO;
  25. // NOTE: The callee is responsible for allocating all BSTRs, and the caller
  26. // is responsible for freeing all BSTRs (both use SysAllocXxx calls).
  27. typedef struct _IU_PLATFORM_INFO
  28. {
  29. OSVERSIONINFOEX osVersionInfoEx; // if osVersionInfoEx.dwOSVersionInfoSize == sizeof(OSVERSIONINFO)
  30. // then only first six (OSVERSIONINFO) members are valid.
  31. BOOL fIsAdministrator; // Applies only to NT platforms (always FALSE on Win9x)
  32. BSTR bstrOEMManufacturer;
  33. BSTR bstrOEMModel;
  34. BSTR bstrOEMSupportURL; // Only if oeminf.ini exists on machine
  35. } IU_PLATFORM_INFO, *PIU_PLATFORM_INFO;
  36. typedef struct _OEMINFO
  37. {
  38. DWORD dwMask;
  39. TCHAR szWbemOem[65];
  40. TCHAR szWbemProduct[65];
  41. TCHAR szAcpiOem[65];
  42. TCHAR szAcpiProduct[65];
  43. TCHAR szSmbOem[65];
  44. TCHAR szSmbProduct[65];
  45. DWORD dwPnpOemId;
  46. TCHAR szIniOem[256];
  47. TCHAR szIniOemSupportUrl[INTERNET_MAX_URL_LENGTH];
  48. } OEMINFO, * POEMINFO;
  49. #define OEMINFO_WBEM_PRESENT 0x0001
  50. #define OEMINFO_ACPI_PRESENT 0x0002
  51. #define OEMINFO_SMB_PRESENT 0x0004
  52. #define OEMINFO_PNP_PRESENT 0x0008
  53. #define OEMINFO_INI_PRESENT 0x0010
  54. HRESULT WINAPI DetectClientIUPlatform(PIU_PLATFORM_INFO pIuPlatformInfo);
  55. LANGID WINAPI GetSystemLangID(void);
  56. LANGID WINAPI GetUserLangID(void);
  57. HRESULT GetOemBstrs(BSTR& bstrManufacturer, BSTR& bstrModel, BSTR& bstrSupportURL);
  58. HRESULT GetLocalFixedDriveInfo(DWORD* pdwNumDrives, PPIU_DRIVEINFO ppDriveInfo);
  59. BOOL IsAdministrator(void);
  60. //
  61. // tell whether the current logon is member of admins or power users
  62. //
  63. #define IU_SECURITY_MASK_ADMINS 0x00000001
  64. #define IU_SECURITY_MAST_POWERUSERS 0x00000002
  65. DWORD GetLogonGroupInfo(void);
  66. int IsWindowsUpdateDisabled(void);
  67. int IsWindowsUpdateUserAccessDisabled(void);
  68. int IsAutoUpdateEnabled(void);
  69. //
  70. // Return platform and locale strings for use with iuident.txt files.
  71. //
  72. LPTSTR GetIdentPlatformString(LPTSTR pszPlatformBuff, DWORD dwcBuffLen);
  73. LPTSTR GetIdentLocaleString(LPTSTR pszISOCode, DWORD dwcBuffLen);
  74. LPTSTR LookupLocaleString(LPTSTR pszISOCode, DWORD dwcBuffLen, BOOL fIsUser);
  75. BOOL LookupLocaleStringFromLCID(LCID lcid, LPTSTR pszISOCode, DWORD cchISOCode);
  76. #endif // __IU_OSDET_INC__