///////////////////////////////////////////////////////////////////// // Wrapper.cpp #include "stdafx.h" #include "Wrapper.h" #include #include void CWrapper::startTool(std::wstring& options) { // call CreateProcess(...) passing options as the command line string std::wcout << "\n starting legacy tool with command line: " << options << std::endl; results = L"some results"; } STDMETHODIMP CWrapper::start(BSTR options) { std::wstring toolArgs(options); startTool(toolArgs); return S_OK; } STDMETHODIMP CWrapper::collectResults(BSTR* resultsPtr) { *resultsPtr = results.Detach(); return S_OK; }