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.

62 lines
1.6 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to
  4. // existing Microsoft documentation.
  5. //
  6. //
  7. //
  8. //
  9. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  10. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  11. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  12. // PURPOSE.
  13. //
  14. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  15. //
  16. //
  17. //
  18. //==============================================================;
  19. #include "Sky.h"
  20. const GUID CSkyBasedVehicle::thisGuid = { 0x2974380f, 0x4c4b, 0x11d2, { 0x89, 0xd8, 0x0, 0x0, 0x21, 0x47, 0x31, 0x28 } };
  21. //==============================================================
  22. //
  23. // CSkyBasedVehicle implementation
  24. //
  25. //
  26. HRESULT CSkyBasedVehicle::OnShow(IConsole *pConsole, BOOL bShow, HSCOPEITEM scopeitem)
  27. {
  28. HRESULT hr;
  29. IUnknown *pUnk = NULL;
  30. IMessageView *pMessageView = NULL;
  31. hr = pConsole->QueryResultView(&pUnk);
  32. if (SUCCEEDED(hr)) {
  33. hr = pUnk->QueryInterface(IID_IMessageView, (void **)&pMessageView);
  34. if (SUCCEEDED(hr)) {
  35. pMessageView->SetIcon(Icon_Information);
  36. pMessageView->SetTitleText(L"Sky-based vehicles");
  37. pMessageView->SetBodyText(L"Sky-based vehicles have no child nodes.");
  38. pMessageView->Release();
  39. }
  40. pUnk->Release();
  41. }
  42. return S_FALSE;
  43. }
  44. HRESULT CSkyBasedVehicle::GetResultViewType(LPOLESTR *ppViewType, long *pViewOptions)
  45. {
  46. // error message control
  47. LPOLESTR lpOleStr = NULL;
  48. HRESULT hr = StringFromCLSID(CLSID_MessageView, &lpOleStr);
  49. *ppViewType = lpOleStr;
  50. return hr;
  51. }