Hi, i still do not see wich part of your code is calling the 3rd party dll, whose name doesnt appear.
Isn't this the ususal way of calling a function in a DLL ?
Isn't this the ususal way of calling a function in a DLL ?
Code: [Select]
#include "stdafx.h"
#include <windows.h>
typedef void (_stdcall *oupfuncPtr)(short PortAddress, short data);
typedef short (_stdcall *inpfuncPtr)(short PortAddress);
oupfuncPtr _Out32;
inpfuncPtr Inp32;
int Reset(void)
{
HINSTANCE hInstLibrary = LoadLibrary("inpout32.dll");
if (hInstLibrary == NULL)
{
FreeLibrary(hInstLibrary);
return 1; //pb de chargement de la Dll
}
_Out32 = (oupfuncPtr) GetProcAddress(hInstLibrary, "Out32");
Inp32 = (inpfuncPtr) GetProcAddress(hInstLibrary, "Inp32");
if ((_Out32 == NULL) || (Inp32 == NULL)) {
FreeLibrary(hInstLibrary);
}
_Out32(78,11);
Inp32(0x34);
}