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.

47 lines
1.2 KiB

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