Re: GetProcAddress in Delphi .net 2005
- From: "Andre Joosten" <andrejoosten@xxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 09:32:15 +1200
I have a couple of Tax modules (Dll) . so i made an object that loads the
correct dll.
The Dll's are ok, i can link them stasticaly. eg This works :
Procedure CalcProfit (Cost : Currency;
CostTaxID : Integer;
Sell : Currency;
SellTaxID : Integer;
Var ProfitD : Currency;
Var ProfitP : Double); External 'STAX.DLL';
But when I try Dynamicaly, It loads the Dll, and finds the ProcAddress,
but i get an error when trying to use the address. I also checked in the
dll, it never gets there, so its not (just) parameter handeling.
All the documentation indicates that it should work...
"Marc Rohloff" <marcrohloff_ng@xxxxxxxxxxx> wrote in message
news:1114607167.255048.239710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Andre Joosten wrote:
>> I am having difficulty making the below bit work.
>> fLibH := LoadLibrary(LibName);
>> @fGetTaxName :=
> GetProcAddress(fLibH,GetTaxNameProcName).ToPointer;
>> It 'sorta' works, but I can not use the fGetTaxName or fCalcProfit
>> Without a error :
>> "Object reference not set to an instance of an object"
>
>> What am i doing wrong...
>
> The problem is that .NET does not really work this way. Sometimes you
> need to do things differently in .NET.
>
> So what are you trying to do, exactly?
>
> --
> Marc Rohloff
>
.
- Follow-Ups:
- Re: GetProcAddress in Delphi .net 2005
- From: Jamie
- Re: GetProcAddress in Delphi .net 2005
- References:
- GetProcAddress in Delphi .net 2005
- From: Andre Joosten
- Re: GetProcAddress in Delphi .net 2005
- From: Marc Rohloff
- GetProcAddress in Delphi .net 2005
- Prev by Date: Re: OnFilterRecord
- Next by Date: Re: GetProcAddress in Delphi .net 2005
- Previous by thread: Re: GetProcAddress in Delphi .net 2005
- Next by thread: Re: GetProcAddress in Delphi .net 2005
- Index(es):
Relevant Pages
|