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.

33 lines
760 B

  1. #include "stdinc.h"
  2. #include "cdmgr.h"
  3. #include "SxApwCreate.h"
  4. static ATL::CComModule Module;
  5. BEGIN_OBJECT_MAP(ObjectMap)
  6. OBJECT_ENTRY(__uuidof(CSxApwDataManager), CSxApwDataManager)
  7. END_OBJECT_MAP()
  8. ATL::CComModule* GetModule() { return &Module; }
  9. ATL::_ATL_OBJMAP_ENTRY* GetObjectMap() { return ObjectMap; }
  10. const CLSID* GetTypeLibraryId() { return NULL; }
  11. HRESULT STDMETHODCALLTYPE
  12. CSxApwDataManager::CreateDataSource(
  13. PCWSTR type,
  14. ISxApwDataSource** ppsource
  15. )
  16. {
  17. HRESULT hr;
  18. CLSID clsid;
  19. ATL::CComPtr<ISxApwDataSource> view;
  20. if (FAILED(hr = CLSIDFromString(const_cast<PWSTR>(type), &clsid)))
  21. goto Exit;
  22. if (FAILED(hr = SxApwCreateObject(clsid, ppsource)))
  23. goto Exit;
  24. Exit:
  25. return hr;
  26. }