[EDIT]
Whoops, I thought you had to create the DLL. To use the CreateWriter() functions see these pages:
http://msdn.microsoft.com/library/de...ilitwriter.asp
http://msdn.microsoft.com/library/de...ilitwriter.asp
[/EDIT]
It is expecting you to return a COM object that implements the ILITWriter interface. If you have no knowledge of COM you are going to need to start with a tutorial.
Here is the beginnings of an object that implements ILITWriter:
Code:
class CLITWriter : public ILITWriter
{
private:
LONG m_cRefs;
public:
/* --IUnknown methods-- */
STDMETHODIMP QueryInterface(REFIID riid, void ** ppv)
{
if (ppv == NULL) return E_INVALIDARG;
if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_ILITWriter))
{
*ppv = (ILITWriter *) this;
}
else
{
*ppv = NULL;
return E_NOINTERFACE;
}
AddRef();
return NOERROR;
}
STDMETHODIMP_(ULONG) AddRef(void)
{
return InterlockedIncrement(&m_cRefs);
}
STDMETHODIMP_(ULONG) Release(void)
{
if (InterlockedDecrement(&m_cRefs) == 0)
{
delete this;
return 0;
}
return m_cRefs;
}
/* --ILITWriter methods -- */
STDMETHODIMP SetCallback(IUnknown * pCallback)
{
// code
}
STDMETHODIMP Create(const wchar_t* pwszLitFile, const wchar_t* pwszSourceBasePath,
const wchar_t* pwszSource, int iMinimumReaderVersion)
{
// code
}
// Rest of the ILITWriter methods
};
and here is an implementation of CreateWriter():
Code:
STDMETHODIMP CreateWriter(IUnknown** ppWriter)
{
if (NULL == ppWriter)
{
return E_INVALIDARG;
}
CLITWriter * pLitWriter = new CLITWriter;
*ppWriter = (IUnknown *) pLitWriter;
if (NULL == *ppWriter)
{
return E_OUTOFMEMORY;
}
return NOERROR;
}