Re: GetProcAddress in Delphi .net 2005




Andre Joosten wrote:
> I did find you can't use getprocaddress direct.. need to use a
delegate
> But i can not find (much) on how to do that...

Can't you convert the libraries to .NET assemblies or alternatively to
COM objects? What sort of security settings do you need to run under.
Are you ever going to load more than one DLL in a session? Is the name
of the DLL and the exported function always the same?
I know of 3 ways to do this, they all have their pros and cons.

Generally this technique is typically called Dynamic PInvoke. A search
should get you a few hits. This is the first:
http://www.msnewsgroups.net/group/microsoft.public.dotnet.languages.csharp/topic740.aspx

'Joosten'? This isn't a typical NZ name is it?

--
Marc Rohloff

.



Relevant Pages

  • Re: GetProcAddress in Delphi .net 2005
    ... I did find you can't use getprocaddress direct.. ... need to use a delegate ... >> I have a couple of Tax modules (Dll). ... >> But when I try Dynamicaly, It loads the Dll, and finds the ProcAddress, ...
    (alt.comp.lang.borland-delphi)
  • Unamanged types in managed interface generates TypeLoadExcep
    ... The failure happened when calling a delegate whose interface is ... abstract and whose implementation overrides the interface method. ... and opening the DLL containing the implementation and then the one ... for the type load failure was caused by the inability to ...
    (microsoft.public.dotnet.languages.vc)
  • Re: callbacks
    ... I am writing the UI part and my collegue is writing a dll which will ... When I create an object from the dll, I pass the function pointer (delegate) ... > void MyCppMethod ... > 3) a p/Invoke for the Cpp method: ...
    (microsoft.public.dotnet.languages.csharp)
  • Callback to C# from unmanaged legacy DLL
    ... I am attempting to work with unmanaged code which must ... I have inherited a legacy DLL, supposedly written in C, which I cannot ... public delegate void pConnectCB ... with the callbacks. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Passing reference of the main thread control
    ... puplic delegate void SimbuttonCaptureStream( ... string client_location, string client_url, uint client_port) ... -- Move the call to Control.Invokeinto your callback method ... Then, the DLL can invoke the delegate directly method), and the method referenced by the delegate will handle the call to Control.Invoke. ...
    (microsoft.public.dotnet.languages.csharp)