3
I’m migrating a project to C++, but I’m having trouble calling . dll
This is code:
int LoadDLL (void) {
char handle;
//! Carrega a dll ...
handle = LoadLibrary(L"c:\windows\system\minhadll.dll");
//! Verifica se a dll foi corretamente carregada..
if (handle) {
}
return handle;
}
Error is found in "=" of Handle:
" Intellisense: a value of type "HMODULE" cannot be assigned to an entity of type "int""
What I’m doing wrong, and what they recommend ?
What is the problem you are having with the current code? PS: do not need (or should) declare Handle 2x as char.
– Bacco
I have error in Loadlibrary, :Error: HMODULE
– Felipe S
Do the following, edit the question and put all the relevant details, so that someone can help. Read the linked page here for some cool tips: [Ask]
– Bacco
Okay, I’ll take a hint... Thank you...
– Felipe S
HMODULE is probably the following: in that case, it would have to be
HMODULE handle;
in place ofchar handle;
. And only declare once.– Bacco
Okay, I’ll check here!
– Felipe S