M
Marco
I wrote a DLL in VB.NET using .NET Framework library, to
access a Crystal Report. Then I registered the DLL using
regasm.exe.
Now I need to use this DLL from an executable that:
1) is written in C++ 2) Is based on MFC classes
This is a part of my executable code:
CLSID clsID;
HRESULT hr;
StartReport::_clsStartReportPtr pReport;
hr = CLSIDFromProgID(OLESTR("StartReport.clsStartReport"),
&clsID);
if( FAILED(hr) )
{
TRACE(_T("Error in research of ProgID for
StartReport.clsStartReport\n"));
return;
}
pReport.CreateInstance(clsID);
My C++ program can find correctly the clsID
but 'CreateInstance' can't initialize 'pReport' which is
NULL.
Can someone help me?
Thanks in advance.
Marco.
access a Crystal Report. Then I registered the DLL using
regasm.exe.
Now I need to use this DLL from an executable that:
1) is written in C++ 2) Is based on MFC classes
This is a part of my executable code:
CLSID clsID;
HRESULT hr;
StartReport::_clsStartReportPtr pReport;
hr = CLSIDFromProgID(OLESTR("StartReport.clsStartReport"),
&clsID);
if( FAILED(hr) )
{
TRACE(_T("Error in research of ProgID for
StartReport.clsStartReport\n"));
return;
}
pReport.CreateInstance(clsID);
My C++ program can find correctly the clsID
but 'CreateInstance' can't initialize 'pReport' which is
NULL.
Can someone help me?
Thanks in advance.
Marco.