Novice problem with TOleContainer


2004-07-07 11:53:13 AM
cppbuilder82
I just created an TActiveForm that compiles, registers, and works fine
in VB.
In VB I have:
CV.VehicleDescription = "My Car" 'works just fine
In C++ Builder, I created a form with an OleContainer on it. I try:
Variant app_ocx;
OleContainer1->CreateObject("TestProj1.TestX",false);
app_ocx = OleContainer1->OleObject;
//Everything works except for this line:
app_ocx.OlePropertySet("VehicleDescription", "My Car");
app_ocx = Unassigned;
I get the following error message:
Project OLETestProj.exe raised exception class EAccessViolation with
message 'Access violation at address 000004DC. Read of address
000004DC.
Any ideas? Thoroughly puzzled and green to this line of coding...
Thanks,
Ed.