Re: GetProcAddress in Delphi .net 2005



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
>


.



Relevant Pages

  • Re: Execution detail of Asp.net
    ... page in another temp dir. ... then loads them. ... > compiles the page to a dll in a temp dir, and loads the page (again a ...
    (microsoft.public.dotnet.framework.aspnet)
  • understanding files
    ... I have some questions about some exe, dll, and other ... It's called upon from the registry key ... what do these execuables do and are they necessary? ... \config.nt loads it ...
    (microsoft.public.windowsxp.general)
  • Re: ok ... so...
    ... when you first hit an asp.net site, loads a new appdomain, then loads the ... asp.net dll for that page. ... > I have about 5 user controls which build up the page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • seLinux: how do I avoid this error
    ... I am writing an application for fedora cora 5 that loads a DLL. ... seLinux is enabled, I get the following error from the attempt to load ...
    (comp.os.linux.development.apps)
  • Re: Assembly loaded twice when Assembly.LoadFrom() is used
    ... resource, and when it's needed for calling entrypoints, it loads it as an ... The result is that the DLL has two occurrences in the ... > Looking at the HTTP requests that are made, ... > that the assembly is requested twice from the server. ...
    (microsoft.public.dotnet.framework.remoting)