 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Aaron Miles Guest
|
Posted: Thu Dec 02, 2004 9:36 am Post subject: How to use Com/OLE IDispatch interface |
|
|
Hello there,
I am new to this so please forgive me ... I have an automation object
that I wish to lever upon that some software that I have uses. I use
the type library importer to create the TLB file some of which is
shown below
LIBID_ECIWRAPLib: TGUID = '{50AC14A2-4C38-11D2-8670-0000F87A323C}';
IID_IUtilityWrapper: TGUID =
'{50AC14AF-4C38-11D2-8670-0000F87A323C}';
IID_IEventWrapper: TGUID = '{50AC14B0-4C38-11D2-8670-0000F87A323C}';
IID_IUnitWrapper: TGUID = '{50AC14B1-4C38-11D2-8670-0000F87A323C}';
IID_ICDConfig: TGUID = '{514F0993-DF3B-11D3-AC51-00C04FBCDBE2}';
IID_IEventData: TGUID = '{97C0F830-5CE1-11D2-8677-0000F87A323C}';
CLASS_ECIWrapper: TGUID = '{50AC14B2-4C38-11D2-8670-0000F87A323C}';
IID_IUnitData: TGUID = '{55BD93B2-5F2E-11D2-8678-0000F87A323C}';
CLASS_EventData: TGUID = '{97C0F831-5CE1-11D2-8677-0000F87A323C}';
CLASS_UnitData: TGUID = '{55BD93B3-5F2E-11D2-8678-0000F87A323C}';
CLASS_CDConfig: TGUID = '{514F0992-DF3B-11D3-AC51-00C04FBCDBE2}';
IID_ICDConfigItem: TGUID = '{514F0995-DF3B-11D3-AC51-00C04FBCDBE2}';
CLASS_CDConfigItem: TGUID =
'{514F0996-DF3B-11D3-AC51-00C04FBCDBE2}';
IUnitWrapper = interface(IDispatch)
['{50AC14B1-4C38-11D2-8670-0000F87A323C}']
function Dispatch(const sOperatorTermName: WideString;
iOperatroId: SYSINT;
const bstrUnitId: WideString; const bstrNum1:
WideString;
const bstrComment: WideString; const
bstrLocation: WideString;
const bstrMileage: WideString): Integer;
safecall;
Basically I want to use the Dispatch function from the IUnitWrapper
interface.... how would I go about creating the instance of this
object so that I can?
I create the EciWrapper object by declaring it (console application)
var
e: TEciWrapper;
i: IUnitWrapper;
begin
e:= TEciWrapper.Create(nil);
E.Connect;
I.Dispatch(...) <--- this line does not work :(
Please provide me with a point at which to start with. I can provide
more code from the tlb if necessary.
Cheers and Thanks,
Aaron Miles
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|