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.

46 lines
1.2 KiB

  1. // DOResult.cpp - The polymorphic DataObject for result pane items.
  2. //
  3. // Copyright (c) 1998-1999 Microsoft Corporation
  4. #include "StdAfx.h"
  5. #include "DataObj.h"
  6. /*
  7. * CreateDisplayName - Return the DisplayName string in lpMedium's
  8. * hGlobal pointer.
  9. *
  10. * History: a-jsari 9/28/97 Initial version
  11. */
  12. HRESULT CResultDataObject::CreateDisplayName(LPSTGMEDIUM)
  13. {
  14. return E_FAIL;
  15. }
  16. /*
  17. * CreateNodeTypeData - Return the NodeType for a result item in lpMedium's
  18. * hGlobal pointer.
  19. *
  20. * History: a-jsari 9/28/97 Initial version
  21. *
  22. * Note: The caller is responsible for freeing pMedium's hGlobal.
  23. */
  24. HRESULT CResultDataObject::CreateNodeTypeData(LPSTGMEDIUM pMedium)
  25. {
  26. return Create(reinterpret_cast<const void *>(&cObjectTypeResultItem),
  27. sizeof(GUID), pMedium);
  28. }
  29. /*
  30. * CreateNodeTypeStringData - Return the NodeType for a result item as
  31. * an LPWSTR in lpMedium's hGlobal pointer.
  32. *
  33. * History: a-jsari 9/28/97 Initial version
  34. *
  35. * Note: The caller is responsible for freeing pMedium's hGlobal.
  36. */
  37. HRESULT CResultDataObject::CreateNodeTypeStringData(LPSTGMEDIUM pMedium)
  38. {
  39. USES_CONVERSION;
  40. return Create(WSTR_FROM_CSTRING(cszObjectTypeResultItem),
  41. ((_tcslen(cszObjectTypeResultItem) + 1) * sizeof(WCHAR)), pMedium);
  42. }