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.

71 lines
1.5 KiB

  1. #include "precomp.hxx"
  2. extern void DumpOnePackage( MESSAGE *, PACKAGEDETAIL * );
  3. void
  4. _MESSAGE::Init()
  5. {
  6. fDumpOnly = 0;
  7. fPathTypeKnown = 0;
  8. pClsDict = new CLSDICT;
  9. pAppDict = new APPDICT;
  10. pPackageDict = new PDICT;
  11. pIIDict = new IIDICT;
  12. pPackagePath = 0;
  13. pPackageName = 0;
  14. hRoot = HKEY_CLASSES_ROOT;
  15. RunningAppIDValue = 1;
  16. pSetupCommand = 0;
  17. pClassStoreName = 0;
  18. pClassStoreDomainName = 0;
  19. pIconPath = 0;
  20. pDumpOnePackage = 0;
  21. GetSystemTimeAsFileTime(&ftLow);
  22. ftHigh = ftLow;
  23. Locale = MAKELANGID( LANG_ENGLISH,SUBLANG_ENGLISH_US);
  24. // Architecture= MAKEARCHITECTURE( HW_X86, OS_WINNT );
  25. ActFlags = 0;
  26. }
  27. _MESSAGE::_MESSAGE()
  28. {
  29. Init();
  30. }
  31. _MESSAGE::_MESSAGE( HKEY hKey )
  32. {
  33. Init();
  34. hRoot = hKey;
  35. }
  36. _MESSAGE::_MESSAGE(char * pRootKeyName )
  37. {
  38. Init();
  39. SetRootKey( pRootKeyName );
  40. }
  41. _MESSAGE::~_MESSAGE()
  42. {
  43. if( pClsDict )
  44. delete pClsDict;
  45. if( pAppDict )
  46. delete pAppDict;
  47. if( pPackageDict )
  48. delete pPackageDict;
  49. if( pIIDict )
  50. delete pIIDict;
  51. }
  52. LONG
  53. _MESSAGE::SetRootKey(
  54. char * pRootKeyName )
  55. {
  56. LONG error = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
  57. pRootKeyName,
  58. 0,
  59. KEY_ALL_ACCESS,
  60. &hRoot );
  61. return error;
  62. }