Re: Dynamic DLL
From: Lars-Eric Gisslén (nowhere_at_inter.net)
Date: 03/25/04
- Next message: msnews.microsoft.com: "SaveAs not working in excel xp vba"
- Previous message: Karl E. Peterson: "Re: Dynamic DLL"
- In reply to: Holm Kirschgens: "Dynamic DLL"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Mar 2004 18:54:04 +0100
Holm,
>From what I know, VB/VBA can not call a function by the function pointer.
I have a solution where I load the DLL dynamically (using
LoadLibrary/FreeLibrary) but I have the DLL declarations in the VBA code
like
Declare Function ......
The DLL resides on a server on the network (the client can be in another
city) and then call the functions declared in the Declare... statements. The
only thing I make sure is that I can succesfully load the DLL before I call
any Func/Sub in the module where the DLL functions are declared (the Declare
statements are declared as Private).
Has never failed for me. The DLL is loaded from the server about one million
times per year so I might say it works.
-- Regards, Lars-Eric Gisslén "Holm Kirschgens" <kirschgens@advis.de> skrev i meddelandet news:c3utf0$2ah06j$1@ID-13880.news.uni-berlin.de... > Dear group, > > I want to call some functions in a DLL, which has to be loaded > dynamically. So I declare the functions LoadLibrary, GetProcAddress, and > FreeLibrary from kernel32.dll. I can load the DLL and I can get the > address of the function. But how can I call it, i.e. how do I handle the > function parameters? Somewhere I found some examples where the > CallWindowProc is uses, but how do I pass the parameters to it? > > Thanks in advance, > Holm Kirschgens. >
- Next message: msnews.microsoft.com: "SaveAs not working in excel xp vba"
- Previous message: Karl E. Peterson: "Re: Dynamic DLL"
- In reply to: Holm Kirschgens: "Dynamic DLL"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|