Source code of Windows XP (NT5)
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.

84 lines
1.8 KiB

  1. /*** findoem.h - Public header for GetOemInfo
  2. *
  3. * Copyright (c) 1998-1999 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * Author: Yan Leshinsky (YanL)
  6. * Created 10/08/98
  7. *
  8. * MODIFICATION HISTORY
  9. */
  10. #ifndef _FINDOEM_H
  11. #define _FINDOEM_H
  12. /*** GetMachinePnPID - Find IDs corresponding to Make and Model code
  13. *
  14. * ENTRY
  15. * PSZ szTable
  16. * Table format is
  17. *
  18. * |##| ... |##|00|##|##|##|##|
  19. * | | | |
  20. * OEM Model \0 PnP ID
  21. *
  22. * |00|00|00|00|
  23. * | |
  24. * 00000
  25. *
  26. * EXIT
  27. * PnP ID or 0
  28. */
  29. DWORD GetMachinePnPID(PBYTE szTable);
  30. /*** DetectMachineID - Gather all available machine OEM and model information and return ID
  31. *
  32. * EXIT
  33. * returns ID
  34. */
  35. LPCTSTR DetectMachineID(bool fAlwaysDetectAndDontSave = false);
  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. } OEMINFO, * POEMINFO;
  48. #define OEMINFO_WBEM_PRESENT 0x0001
  49. #define OEMINFO_ACPI_PRESENT 0x0002
  50. #define OEMINFO_SMB_PRESENT 0x0004
  51. #define OEMINFO_PNP_PRESENT 0x0008
  52. #define OEMINFO_INI_PRESENT 0x0010
  53. /*** GetOemInfo - Gather all available machine OEM and model information
  54. *
  55. * ENTRY
  56. * POEMINFO pOemInfo
  57. * BOOL fAlwaysDetectAndDontSave - do what is says
  58. *
  59. * EXIT
  60. * POEMINFO pOemInfo
  61. * All fields that aren't available will be filled with 0
  62. * returns NULL
  63. */
  64. void GetOemInfo(POEMINFO pOemInfo, bool fAlwaysDetectAndDontSave = false);
  65. /*** MakeAndModel - Return ID for a machine
  66. *
  67. * returns ID
  68. */
  69. LPCTSTR MakeAndModel(POEMINFO pOemInfo);
  70. /*** ID support
  71. */
  72. BOOL IsValidStringID(PSZ pszID);
  73. DWORD NumericID(PSZ psz);
  74. PSZ StringID(DWORD dwID);
  75. #endif