When I import tlb file that is specific to a .net dll, into Delphi using type library importer, the methods which accept parameters of type .net specific, are replaced by IUnknown. When I want to invoke such method from my Delphi client application, I would like to pass a parameter value of type SQLTransaction. How do I achieve this? Do I need to change all the .net dll method parameters to user defined types that inherit from .net specific types?
I also have mscorlib_TLB.pas imported when I improted .net tlb.
.net method
public class MyConnection : IDisposable
{
public int BulkInsert(SqlTransaction tran);
{...}
}
Method in Delphi imported tlb:
_MyConnection = interface(IDispatch)
['{9FB088F8-1033-3A99-B9C6-C7D7D2D40140}']
function BulkInsert(const SQLTransaction: IUnknown): int; safecall;
end;
CoMyConnection = class
class function Create: _MyConnection;
class function CreateRemote(const MachineName: string): _MyConnection;
end;
how do I call the BulkInsert method from my Delphi client application?