I have created a lib which contains DateRange class in c#. I have created .dll and .tlb for that lib and registered the .tlb file. All the necessary steps has been done.
In Delphi, i used import type library option to produce a unit which contain the information of all classes which i created in c#.
Problem: I dont know how to use the member of DateRange class. Please help me.
Code I used in Delphi is...
program COMTesting;
{$APPTYPE CONSOLE}
uses
SysUtils,
ComObj,
MCenterComService_TLB in 'MCenterComService_TLB.pas';
var dr:DateRange;
begin
dr:= createComObject(CLASS_DateRange) as DateRange;
dr.fromdate:= date('4/16/2009');
dr.todate:= date('4/16/2009');
end.
System says : [DCC Error] COMTesting.dpr(18): E2003 Undeclared identifier: 'fromdate'