G
Guest
I'm using a .NET Windows Forms Applications project.
I'm using LoadLibrary & GetProcAddress to use a DLL function.
This is all done in the main cpp file.
I would like to use this DLL function in a .h file. So I code :
(Proc2) (0x378, 12)....... (where Proc2 is the function)
I get a compiler error : C2065 : 'Proc2' : undeclared identifier.
I'm guessing I'm not calling this function properly - how can I fix this
problem ?
When I write a program that contains a main cpp file that loads the DLL
function &
defines Proc2 via GetProcAddress, & finally uses it in this same file, then
Proc2 runs correctly.
So I'm guessing when this code is split into a cpp & a .h file, I need to
call Proc2 differently ??
The reason I'm splitting the use of the Proc2 function into a header file,
is back that's where the event hamdler for a button click from the GUI is
located.
Any advice is appreciated.
Thanks,
AK
I'm using LoadLibrary & GetProcAddress to use a DLL function.
This is all done in the main cpp file.
I would like to use this DLL function in a .h file. So I code :
(Proc2) (0x378, 12)....... (where Proc2 is the function)
I get a compiler error : C2065 : 'Proc2' : undeclared identifier.
I'm guessing I'm not calling this function properly - how can I fix this
problem ?
When I write a program that contains a main cpp file that loads the DLL
function &
defines Proc2 via GetProcAddress, & finally uses it in this same file, then
Proc2 runs correctly.
So I'm guessing when this code is split into a cpp & a .h file, I need to
call Proc2 differently ??
The reason I'm splitting the use of the Proc2 function into a header file,
is back that's where the event hamdler for a button click from the GUI is
located.
Any advice is appreciated.
Thanks,
AK