Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question#include <windows.h> HINSTANCE hInst, hDll; typedef bool (*ENCODE) (char*, char*); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { hInst = hInstance; hDll = (HINSTANCE) LoadLibrary("DffEncoding.dll"); if(!hDll) { MessageBox(0, "Impossible de charger la librairie", "Erreur au chargement", 0); return 1; } ENCODE pEncode; pEncode = (ENCODE) GetProcAddress(hDll, "EncodeToDff"); if(!pEncode) { MessageBox(0, "Fonction non trouvée", "Fonction manquante", 0); return 1; } (pEncode) ("D:\\file.bmp", "D:\\file.dff"); }
bool DLLEXPORT EncodeToDff(char* fichier, char* dest); BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) { switch (reason) { case DLL_PROCESS_ATTACH: break; case DLL_PROCESS_DETACH: break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; } return TRUE; } bool DLLEXPORT EncodeToDff(char* fichier, char* dest) { //instructions }