Hi All,

I'm struggling through this automation project that I'm in the middle 
of.  I need a Delph program to talk to an application which is a .net 
application and I have no idea what language it was written in.  The 
application has installed a COM server on my machine, and I have 
imported the type library via Delphi but I'm stuck on grabbing data 
from the COM server.

I have gone with
    baCom := CreateComObject(CLASS_ComClass) as ComClass;

which works.  I can control the other application using methods that 
require a simple integer (or no) argument.

however, the method GetSports returns an array of objects of type 
_bfsport.  I know that this is a record with two fields
    sport : String;
    sportid : Integer;

I have declared two variables,
    sports  : Array of BfSport;
    mysport : BfSport;

I use
    sports := baCom.GetSports;

and this works.  sports is filled with an array of pointers to 
objects of type _bfsport.

however, I can't access the data in those objects.  I can use
    mysport := sports[1];

and the compiler likes it and it seems to work, but then I can't do
    mysport.sport
the compiler complains about sport not being declared.

Can anyone help me please?

Cheers,
Chris.

_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to