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.

86 lines
2.3 KiB

  1. //=======================================================================
  2. //
  3. // Copyright (c) 1998-1999 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // File: bucket.h
  6. //
  7. // Owner: YanL
  8. //
  9. // Description:
  10. //
  11. // CDM bucket support
  12. //
  13. //=======================================================================
  14. #ifndef _BUCKET_H
  15. #pragma pack(1)
  16. //CDM hash table structures
  17. //Hash table header
  18. typedef struct _CDM_HASHTABLEHDR
  19. {
  20. DWORD iVersion; //hash table version
  21. long iTableSize; //hash table size in bits
  22. } CDM_HASHTABLEHDR, *PCDM_HASHTABLEHDR;
  23. //hash table format
  24. typedef struct _CDM_HASHTABLE
  25. {
  26. CDM_HASHTABLEHDR hdr; //hash table header
  27. #pragma warning( disable : 4200 )
  28. BYTE pData[]; //actual hash table bits
  29. #pragma warning( default : 4200 )
  30. } CDM_HASHTABLE, *PCDM_HASHTABLE;
  31. //This structure represents a cdm bucket file. A CDM bucket file
  32. typedef struct _CDM_RECORD_HEADER
  33. {
  34. long cnRecordLength; //Total length of the record
  35. long nBitmaskIdx; //cdm bitmask index
  36. PUID puid; //Windows Update assigned id that is unique
  37. //across catalogs and records. This id names
  38. } CDM_RECORD_HEADER, *PCDM_RECORD_HEADER;
  39. // Followed by:
  40. // char szHardwareID[]; \0 terminated
  41. // char szDescription[]; \0 terminated
  42. // char szMfgName[]; \0 terminated
  43. // char szProviderName[]; \0 terminated
  44. // char szDriverVer[]; \0 terminated
  45. // char szCabFileTitle[]; \0 terminated
  46. #pragma pack()
  47. // Prefixes for Printer Hardware IDs
  48. #define PRINT_ENVIRONMENT_INTEL _T("0001") // Windows NT x86
  49. #define PRINT_ENVIRONMENT_ALPHA _T("0002") // Windows NT Alpha_AXP
  50. struct IDrvInfo;
  51. ULONG CDM_HwID2Hash(IN LPCTSTR szHwID, IN ULONG iTableSize);
  52. typedef struct _DRIVER_MATCH_INFO {
  53. LPCSTR pszHardwareID;
  54. LPCSTR pszDescription;
  55. LPCSTR pszMfgName;
  56. LPCSTR pszProviderName;
  57. LPCSTR pszDriverVer;
  58. LPCSTR pszCabFileTitle;
  59. } DRIVER_MATCH_INFO, *PDRIVER_MATCH_INFO;
  60. PUID CDM_FindUpdateInBucket(
  61. IN LPCTSTR szHardwareIdFromDevice, FILETIME* pftInstalled,
  62. IN LPBYTE pBucket, IN int cbBucket, IN LPBYTE pBitmask,
  63. OUT PDRIVER_MATCH_INFO pDriverMatchInfo
  64. );
  65. PUID CDM_FindInstalledInBucket(
  66. IN IDrvInfo* pDrvInfo, IN LPCTSTR szHardwareIdInstalled,
  67. IN LPBYTE pBucket, IN int cbBucket, IN LPBYTE pBitmask,
  68. OUT PDRIVER_MATCH_INFO pDriverMatchInfo
  69. );
  70. #define _BUCKET_H
  71. #endif