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 37 38 39 40 41 42 43 44 45 46 47
| ////////////////////////////////////////////////////////////////////
procedure Tges0000_ecran.Button1Click(Sender: TObject);
type
TGetDLLVersion = procedure (var P1:pansichar); cdecl;
var
m_DllDataSize: integer;
mp_DllData: Pointer;
m_DllHandle,d_DllHandle: THandle;
str1: pansichar;
VpxDLL:TGetDLLVersion;
begin
m_DllHandle := LoadLibrary('ccvJIL.dll');
try
if m_DllHandle = 0 then Abort;
////Récupération de la version DLL
@VpxDLL := GetProcAddress(m_DllHandle, 'GetDLLVersion');
if @VpxDLL <> nil then
begin
//On envoie la transaction sur le terminal
VpxDLL(str1);
showmessage(str1);
end;
/////////////////////////////////////
if m_DllHandle <> 0 then
FreeLibrary(m_DllHandle);
except
ShowMessage('An error occoured while loading the dll');
end;
end;
//////////////////////////////////////////////////////////////////////// |
Partager