General information
Category:
COM/DCOM and OLE Automation
Title:
Com object malfunctions
Hi all,
In Visual FoxPro I built a COM object (a COM DLL) with a number of
procedures.
All classes in it were defined as "OLEPUBLIC"
When calling a procedure in the Com object (from a Delphi application) on
the same PC as where the object was made, no problem occurs.
In the VFP setup wizard in step 2, the VFP runtime and Com components (the
DLL itself) were checked to be included.
After installation on another computer and calling a procedure in the COM
object from Delphi a message appears saying: "Library not registered".
Inspection of the registry however learns that the object has been
registered.
The Delphi code looks as follows:
****************************************************************************
*
procedure TForm1.Button1Click(Sender: TObject);
var
oparam1 : olevariant;
begin
file://Creating instance of com object named : comdemo.Form1
oparam1 := createoleobject('pfcomobj.pfspecform');
oparam1.GetScreenByID(1);
end;
****************************************************************************
*
Creation of the object goes well, but the error message occurs when the
specified function (in the case 'GetScreenByID' is called.
Registering the DLL on the 'new' machine through regsvr32 makes no
difference.
What could be wrong? Which library is not registered?
TIA
Jan Lavrijsen
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only