If I use Win32 to access the variables and Win32::API to access the functions, would the two modules load different instances of the dll?
No. If the dll in question is already loaded, then LoadLibrary() just returns a handle to it.
If I understand correctly, I suspect that I can follow your example and by using only the pack 'L!', $proc syntax of the last line to get the address of variables and functions. With that, I should be able to get any variable or function in my code to 'point' to a corresponding variable/function in the dll and would not necessarily need Win32::API. Then I don't have to worry about the possibility of my code accessing different instances of the dll.
Like I say, not a possibility. Besides which, whilst you can get the procedure addresses in the same way, the Pure Perl technique for invoking that address is still lost in the mists of time. On top of that, how would you set up the parameter passing?
In reply to Re^3: How to use Win32::API to access variable in DLL file?
by BrowserUk
in thread How to use Win32::API to access variable in DLL file?
by dasgar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |