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.

81 lines
2.2 KiB

  1. //=======================================================================
  2. //
  3. // File: DuDriver.h (cut and paste slim down version of bucket.h)
  4. //
  5. // Owner: RogerJ (Original creator: YanL)
  6. //
  7. // Description:
  8. //
  9. // CDM bucket support
  10. //
  11. //=======================================================================
  12. #ifndef _BUCKET_H
  13. #pragma pack(1)
  14. //CDM hash table structures
  15. //Hash table header
  16. typedef struct _CDM_HASHTABLEHDR
  17. {
  18. DWORD iVersion; //hash table version
  19. long iTableSize; //hash table size in bits
  20. } CDM_HASHTABLEHDR, *PCDM_HASHTABLEHDR;
  21. //hash table format
  22. typedef struct _CDM_HASHTABLE
  23. {
  24. CDM_HASHTABLEHDR hdr; //hash table header
  25. #pragma warning( disable : 4200 )
  26. BYTE pData[]; //actual hash table bits
  27. #pragma warning( default : 4200 )
  28. } CDM_HASHTABLE, *PCDM_HASHTABLE;
  29. //This structure represents a cdm bucket file. A CDM bucket file
  30. typedef struct _CDM_RECORD_HEADER
  31. {
  32. long cnRecordLength; //Total length of the record
  33. long nBitmaskIdx; //cdm bitmask index
  34. PUID puid; //Windows Update assigned id that is unique
  35. //across catalogs and records. This id names
  36. } CDM_RECORD_HEADER, *PCDM_RECORD_HEADER;
  37. // Followed by:
  38. // char szHardwareID[]; \0 terminated
  39. // char szDescription[]; \0 terminated
  40. // char szMfgName[]; \0 terminated
  41. // char szProviderName[]; \0 terminated
  42. // char szDriverVer[]; \0 terminated
  43. // char szCabFileTitle[]; \0 terminated
  44. #pragma pack()
  45. // Prefixes for Printer Hardware IDs
  46. #define PRINT_ENVIRONMENT_INTEL "0001" // Windows NT x86
  47. #define PRINT_ENVIRONMENT_ALPHA "0002" // Windows NT Alpha_AXP
  48. ULONG CDM_HwID2Hash(IN LPCSTR szHwID, IN ULONG iTableSize);
  49. typedef struct _DRIVER_MATCH_INFO {
  50. LPCSTR pszHardwareID;
  51. LPCSTR pszDescription;
  52. LPCSTR pszMfgName;
  53. LPCSTR pszProviderName;
  54. LPCSTR pszDriverVer;
  55. LPCSTR pszCabFileTitle;
  56. } DRIVER_MATCH_INFO, *PDRIVER_MATCH_INFO;
  57. #define _BUCKET_H
  58. typedef struct _DRIVER_DOWNLOAD_INFO {
  59. int nDriverVer;
  60. PosIndex Position;
  61. char szCabFile[MAX_PATH];
  62. PUID puid;
  63. } DRIVER_DOWNLOAD_INFO, *PDRIVER_DOWNLOAD_INFO;
  64. void PlaceHolderCleanUp(PDRIVER_DOWNLOAD_INFO* pTemp, int nTotal);
  65. #endif