parametrs in dll

Post Reply
User avatar
kajot
Posts: 309
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

parametrs in dll

Post by kajot »

How may I call out function _OWERSJA form WINIP.dll where p1,p2 there are names of files (p1 - file in, p2 - file out)

p1:="OWERSJA.IN"
p2:="OWERSJA.OUT"

err:=_OWersja(p1,p2)

declare DLL_TYPE_BYTE _OWersja(DLL_TYPE_LPTSTR cFile1, DLL_TYPE_LPTSTR cFile2) in winip.dll
best regards
kajot
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Try this:

DLL FUNCTION _OWERSJA( cFile1 AS LPSTR, cFile2 AS LPSTR ) AS LONG PASCAL LIB "winip.dll"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
kajot
Posts: 309
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Post by kajot »

in C

unsigned char __declspec(dllimport) _cdecl _OWersja(char* in, char* out);

my source:

#include "FiveWin.ch"
//---------------------------------------------------------------------------//

function Main()

p1:="OWERSJA.IN"
p2:="OWERSJA.OUT"
err:=_OWersja( p1, p2 )
msginfo(err)

return nil

//---------------------------------------------------------------------------//
DLL FUNCTION _OWERSJA( cFile1 AS LPSTR, cFile2 AS LPSTR ) AS BYTE PASCAL LIB "WinIP.dll"

/
best regards
kajot
Post Reply