Delphi RIO changes old _TLB.pas parameters datatype definitions

108 Views Asked by At

The COM dll was developed in Delphi 2009. We successfully upgraded the project in Delphi RIO. Tested fine as well.

Now when I add a new method in DLL interface, and regenerate _TLB.pas in type library editor, it not only adds the new method, but also changes the datatype of few parameters of unchanged procedures/functions.

Delphi 2009 Definition:

procedure SaveData(var AParam1: OleVariant;......); //custom unchanged method
// Methods from IAppServer
function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant; MaxErrors: Integer; 
                         out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant; dispid 20000000;
function AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut: Integer; 
                       Options: Integer; const CommandText: WideString; var Params: OleVariant; 
                       var OwnerData: OleVariant): OleVariant; dispid 20000001;
function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer; ...

Delphi RIO definitions:

procedure SaveData(**const** AParam1: OleVariant;......); //custom unchanged method
// Methods from IAppServer
function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant; MaxErrors: **SYSINT**; 
                         out ErrorCount: **SYSINT**; var OwnerData: OleVariant): OleVariant; dispid 20000000;
function AS_GetRecords(const ProviderName: WideString; Count: **SYSINT**; out RecsOut: **SYSINT**; 
                       Options: **SYSINT**; const CommandText: WideString; var Params: OleVariant; 
                       var OwnerData: OleVariant): OleVariant; dispid 20000001;
function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: **SYSINT**; ...

Changes are in enclosed with **.. (For SaveData(), 'var' to 'const' and for others 'integer' to 'SYSINT').

Another important detail is, in D2009, in the type library editor, the SaveData >> AParam1 is defined of datatype "POleVariant1", and "POleVariant1" is an alias of type "^OleVariant".

The question is: should I keep the type library definitions of the unchanged methods as it is and let _TLB.pas get updated as above?

0

There are 0 best solutions below