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.

59 lines
1.5 KiB

  1. //
  2. // MODULE: Properties.cpp
  3. //
  4. // PURPOSE: State variables that are changed here are not
  5. // reset when TSLReInit is used.
  6. //
  7. // PROJECT: Local Troubleshooter Launcher for the Device Manager
  8. //
  9. // COMPANY: Saltmine Creative, Inc. (206)-633-4743 [email protected]
  10. //
  11. // AUTHOR: Richard Meadows
  12. //
  13. // ORIGINAL DATE: 2-26-98
  14. //
  15. //
  16. // Version Date By Comments
  17. //--------------------------------------------------------------------
  18. // V0.1 - RM Original
  19. ///////////////////////
  20. #include <windows.h>
  21. #include <windowsx.h>
  22. #include <winnt.h>
  23. #include "TSLError.h"
  24. #include "LaunchServ.h"
  25. #include <comdef.h>
  26. #include "Properties.h"
  27. DWORD MachineID(ITShootATL *pITShootATL, _bstr_t &bstrMachineID)
  28. {
  29. HRESULT hRes;
  30. DWORD dwResult = TSL_ERROR_GENERAL;
  31. hRes = pITShootATL->MachineID(bstrMachineID, &dwResult);
  32. if (TSL_SERV_FAILED(hRes))
  33. dwResult = TSL_ERROR_OBJECT_GONE;
  34. return dwResult;
  35. }
  36. DWORD DeviceInstanceID(ITShootATL *pITShootATL, _bstr_t &bstrDeviceInstanceID)
  37. {
  38. HRESULT hRes;
  39. DWORD dwResult = TSL_ERROR_GENERAL;
  40. hRes = pITShootATL->DeviceInstanceID(bstrDeviceInstanceID, &dwResult);
  41. if (TSL_SERV_FAILED(hRes))
  42. dwResult = TSL_ERROR_OBJECT_GONE;
  43. return dwResult;
  44. }
  45. DWORD PreferOnline(ITShootATL *pITShootATL, BOOL bPreferOnline)
  46. {
  47. HRESULT hRes;
  48. DWORD dwResult = TSL_OK;
  49. hRes = pITShootATL->put_PreferOnline(bPreferOnline);
  50. if (TSL_SERV_FAILED(hRes))
  51. dwResult = TSL_ERROR_OBJECT_GONE;
  52. return dwResult;
  53. }