Using Crystal Reports 10.2 (built in to VS2005), I could use this code:
const CLSID CLSID_Application = {0x2b78e518,0xe7d0,0x49bf,{0x8f,0x16,0xcf,0xd6,0x32,0x4d,0xb3,0x07}};
const CLSID CLSID_ReportObjects = {0x2b78e4f5,0xe7d0,0x49bf,{0x8f,0x16,0xcf,0xd6,0x32,0x4d,0xb3,0x07}};
const IID IID_IApplication = {0xaf376830,0x6120,0x4e28,{0x96,0xdd,0x63,0xfd,0x2d,0xc2,0x7b,0x7a}};
const IID IID_IReportObjects = {0xaf376807,0x6120,0x4e28,{0x96,0xdd,0x63,0xfd,0x2d,0xc2,0x7b,0x7a}};
...
CRAXDDRT::IApplicationPtr m_RDC;
HRESULT hr = CoCreateInstance(CLSID_Application, NULL, CLSCTX_INPROC_SERVER, IID_IApplication, (void**)&m_RDC);
m_RDC->LogOnServer(...);
I've managed to discover the CLSID values for the Crystal Reports 2008:
const CLSID CLSID_Application = {0x10DA08B8,0x6A75,0x4091,{0x94,0x64,0x0A,0x66,0xF9,0x39,0xFE,0x28}};
const CLSID CLSID_ReportObjects = {0x645C41FA,0x7565,0x46F9,{0x8B,0x97,0x49,0xBD,0x63,0xC3,0x90,0x36}};
... but can someone tell me what the IID_IApplication and IID_IReportObjects IDDs are? Or should I not be creating the objects this way?
Thanks,
Phil.