
Help with Visual Basic ActiveX DLL showing form within Visual C++ ATL app
Help with
Visual Basic ActiveX DLL showing form within
Visual C++ ATL app
I have created a Visual Basic DLL and can call methods within it
successfully from a Visual C++ app as long as none of the methods shows a
form. Once the form is displayed I receive an UNHANDLED EXCEPTION from
Kernel32. My VB code within the method that shows the form is simply:
Public Sub showForm
Load Form1
Form1.Show
End Sub
The code that creates the VB DLL from Visual C:
#import "VBTest.dll" no_namespace
void testStart()
{
CoInitialize(NULL);
_IVBTestPtr p;
p.CreateInstance(__uuidof(IVBTest));
p->showForm; // Kernel32 Exception Here!
}
I really need to be able to display the VB form from my VC program and,
since this should be such a basic problem, I was hoping somebody here may be
able to enlighten me.
Thanks,
Chris