DLL STATIC FUNCTION I2PDF_GetDLLVersion( ) AS LONG;
FROM "I2PDF_GetDLLVersion" LIB "F:\UTILITY\IMAGE2PDF.DLL"
CALLPROC := "I2PDF_MakePDF"
PARM1 := outfile // output file
PARM2 := 0 // options
PARM3 := SPACE( BUFFER_SIZE ) // CBUFFER
PARM4 := buffer_size // MAXTEXTERROR SIZE
RETURN_TYPE := LONG
CFARPROC := GetProcAdd(NDLL,CALLPROC, PASCAL_TYPE, RETURN_TYPE, ;
LPSTR, LONG, LPSTR, LONG )
RETVAL := calldll( CFARPROC, PARM1, PARM2, @PARM3, PARM4 )
#include "FiveWin.ch"
function Main()
I2PDF_License( "Hello world" )
MsgInfo( "ok" )
return nil
DLL STATIC FUNCTION I2PDF_License( cLicCode AS LPSTR) AS VOID PASCAL ;
FROM "I2PDF_License" LIB "Image2PDF.dll"
#include "FiveWin.ch"
static hLIB
function Main()
hLIB := LoadLibrary( "Image2PDF.dll" )
I2PDF_License( "Hello world" )
I2PDF_SetDPI( 123 )
MsgInfo( I2PDF_GetDLLVersion() )
MsgInfo( "ok" )
FreeLibrary( hLIB )
return nil
DLL STATIC FUNCTION I2PDF_License( cLicCode AS LPSTR ) AS VOID PASCAL ;
FROM "I2PDF_License" LIB hLIB
DLL STATIC FUNCTION I2PDF_SetDPI( nDpi AS LONG ) AS LONG ;
PASCAL FROM "I2PDF_SetDPI" LIB hLIB
DLL STATIC FUNCTION I2PDF_GetDLLVersion( ) AS LONG;
PASCAL FROM "I2PDF_GetDLLVersion" LIB hLib
#include "FiveWin.ch"
#define DC_CALL_STD 0x0020
static hLIB
function Main()
local retval
hLIB := LoadLibrary( "Image2PDF.dll" )
retval := dllcall( hlib, DC_CALL_STD, "I2PDF_License", "Hello World" )
msginfo( retval, 'retval1-license' )
retval := dllcall( hlib, DC_CALL_STD, "I2PDF_SetDPI", 1 )
msginfo( retval, 'retval2-setdpi' )
retval := dllcall( hlib, DC_CALL_STD, "I2PDF_GetDLLVersion" )
msginfo( retval, 'retval3-version' )
FreeLibrary( hLIB )
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 30 guests