Problème fonction LoadLibrary
Bonjour,
Je comprends pas la fonction renvoit NULL...
Si quelqu'un voit mon erreur, merci beaucoup, c'est vraiment pénible d'avoir une erreur toutes les deux lignes. ( Je débute en DLL )
Le test.c
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| #include "test.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) {
HMODULE hDLL = LoadLibrary("testDLL.dll");
if( hDLL == NULL ) { // == 0
MessageBox(0,"Dll Introuvable","",0);
return 1;
}
else
MessageBox(0,"Dll Trouvee","",0);
return 0;
} |
Le test.h
Code:
1 2 3 4 5 6 7 8 9
| #ifndef TEST
#define TEST
#include <windows.h>
#include <stdio.h>
#endif |
J'ai pourtant essayer de suivre la doc msdn, puis j'ai lu pas mal d'exemples sur internet, pourtant après plein d'essai, toujours au niveau 0...
Merci par avance