// FileHandler.cpp : Implementation of CFileHandler #include "stdafx.h" #include "FileHandler.h" // CFileHandler STDMETHODIMP CFileHandler::GetFileNames(LONG* pCount, BSTR** pFileNames) { *pCount = 3; BSTR* names = (BSTR*)CoTaskMemAlloc(3*sizeof(BSTR)); names[0] = SysAllocString(L"Groucho"); names[1] = SysAllocString(L"Harpo"); names[2] = SysAllocString(L"Zeppo"); *pFileNames = names; return S_OK; }