1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| #include "stdafx.h"
#include "Global.asax.h"
#include <windows.h>
#include "testDLLClass.h"
//using namespace std;
namespace testDLL
{
int testDLLClass::Multiply(int i,int j){
//HMODULE hDLL = LoadLibrary("maDLL.dll");
/*
//on declare un pointeur sur la fonction (avec des 2 parametre ici pour multiply)
typedef int (WINAPI * DLL_Function_Multiply)(int _Value,int _Value2);
DLL_Function_Multiply pfn_Multiply;
//on appelle GetProcAddress(hdll,NOM_DE_LA_FONCTION_DANS_FICHIER_.REF);
pfn_Multiply = (DLL_Function_Multiply)GetProcAddress(hDLL,"Multiply");
//on appelle la fonction
int res = pfn_Multiply(i,j);
//on libère la DLL
FreeLibrary(hDLL);
//return res;
*/
return i*j;
}
}; |