We are looking at a print driver by SoftCopy which allows can print to
images. The neat thing about it is that it has hooks which you can tie
into. It defines the hooks in C++ code though and I remail pretty
ignorant about using MS VC++.
They define a skeletal DLL like so:
(http://www.dobysoft.com/products/sof...foverview.html)
#include <windows.h>
#include "softcopy.h"
// Return job characteristics.
BOOL WINAPI scGetJobInfo(SCJOBINFO* info)
{
return FALSE;
}
// Return output filename and image type.
BOOL WINAPI scGetSaveFileName(SCFILEINFO* info)
{
lstrcpy(info->name, L"c:\\output\\test");
info->type = SC_PDF_MULTIPLE;
return TRUE;
}
// Display a message box when print job is completed.
void WINAPI scEndOfJob()
{
MessageBox(NULL, L"Printing done!", L"Alert",
MB_ICONINFORMATION | MB_OK | MB_SYSTEMMODAL | MB_SETFOREGROUND);
}
Now my question is - is it possible to implement this DLL in C#? Or do I
have to write the DLL in C++? I'm assuming that if the later, there's a
good way to call C# code?
I've seen lots of information on how to call c++ COM stuff from c#, but
I haven't seen a lot of information on going the other way around... Any
pointers to topics that I should look at whould be appreciated
Cheers,
- Dan