GetProcAddress in Delphi .net 2005
- From: "Andre Joosten" <andrejoosten@xxxxxxxxxxx>
- Date: Wed, 27 Apr 2005 17:08:17 +1200
I am having difficulty making the below bit work.
If Length(fLibName) > 0 Then Begin
fLibH := LoadLibrary(LibName);
If fLibH <> 0 Then Begin
@fGetTaxName := GetProcAddress(fLibH,GetTaxNameProcName).ToPointer;
@fCalcProfit := GetProcAddress(fLibH,CalcProfitProcName).ToPointer;
End;
End;
fCalProfit : CalcProfitProc = Procedure (Cost : Currency;
CostTaxID : Integer;
Sell : Currency;
SellTaxID : Integer;
Var ProfitD : Currency;
Var ProfitP : Double); stdCall;
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...
.
- Follow-Ups:
- Re: GetProcAddress in Delphi .net 2005
- From: Marc Rohloff
- Re: GetProcAddress in Delphi .net 2005
- Prev by Date: Re: Faster way of making long string?
- Next by Date: Re: Faster way of making long string?
- Previous by thread: OnFilterRecord
- Next by thread: Re: GetProcAddress in Delphi .net 2005
- Index(es):