Salve,
qualcuno di voi potrebbe convertirmi questo codice (credo in VB) in xHarbour.
Si tratta di una funzione che restituisce la versione del driver amyuni di conversione emf->rtf
Grazie in anticipo.
Saluti
Marco Turco
************
Dim CDIntfMajor As Long
Dim CDIntfMinor As Long
Dim PrinterDriverMajor As Long
Dim PrinterDriverMinor As Long
PDF.GetVersionInformation CDIntfMajor, CDIntfMinor, PrinterDriverMajor, PrinterDriverMinor
MsgBox "Printer Info" & vbNewLine & _
"Major: " & CDIntfMajor & vbNewLine & _
"Minor: " & CDIntfMinor & vbNewLine & _
"PrinterDriverMajor: " & PrinterDriverMajor & vbNewLine & _
"PrinterDriverMinor: " & PrinterDriverMinor
**********
Wrapper
Moderator: Enrico Maria Giordano
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Wrapper
Manca la cosa più importante: come viene istanziato l'oggetto PDF.
EMG
EMG
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
#INCLUDE "FIVEWIN.CH"
static hRtfLib
static hRtfPrinter
static cRtfPrinter
static lGuest
hRTFLib = LOADLIB32( "cdintf.dll" )
cRtfPrinter="SXP Printer"
hRTFPrinter:=RTFDriverOpen(cRTFPrinter)
*********
&& qui voglio richiamare la funzione per conoscere la versione
******
FREELIBRARY(HRTFLIB)
*********************
** amyuni wrapper **
*********************
DLL32 FUNCTION RtfDriverInit( cPrinterName AS LPSTR ) AS LONG;
PASCAL FROM "RTFDriverInit" LIB hRTFLib
DLL32 FUNCTION RtfDriverOpen( cPrinterName AS LPSTR ) AS LONG;
PASCAL FROM "DriverInit" LIB hRTFLib
DLL32 FUNCTION RtfDriverEnd(hRTFPrinter AS LONG) AS VOID;
PASCAL FROM "DriverEnd" LIB hRTFLib
DLL32 FUNCTION RtfSetDefaultPrinter(hRTFPrinter AS LONG) AS LONG;
PASCAL FROM "SetDefaultPrinter" LIB hRTFLib
DLL32 FUNCTION RtfSetDefaultConfig(hRTFPrinter AS LONG) AS LONG;
PASCAL FROM "SetDefaultConfig" LIB hRTFLib
DLL32 FUNCTION RtfRestoreDefaultPrinter(hRTFPrinter AS LONG) AS LONG;
PASCAL FROM "RestoreDefaultPrinter" LIB hRTFLib
DLL32 FUNCTION RtfSetHorizontalMargin(hRTFPrinter AS LONG, nMargin AS LONG) AS LONG;
PASCAL FROM "SetHorizontalMargin" LIB hRTFLib
DLL32 FUNCTION RtfSetVerticalMargin(hRTFPrinter AS LONG, nMargin AS LONG) AS LONG;
PASCAL FROM "SetVerticalMargin" LIB hRTFLib
DLL32 FUNCTION EnablePrinter(hRTFPrinter AS LONG, cRTFCompany AS LPSTR, cRTFCode AS LPSTR) AS LONG;
PASCAL FROM "EnablePrinter" LIB hRTFLib
DLL32 FUNCTION RTFSetDefaultFileName(hRTFPrinter AS LONG, cRTFCompany AS LPSTR) AS LONG;
PASCAL FROM "SetDefaultFileName" LIB hRTFLib
DLL32 FUNCTION RTFFileNameOptions(hRTFPrinter AS LONG, nRTFOption AS _INT) AS LONG;
PASCAL FROM "SetFileNameOptions" LIB hRTFLib
DLL32 FUNCTION RTFSetPrinterParam(hRTFPrinter AS LONG, cRTFParam AS LPSTR, nRTFValue AS LONG) AS _INT;
PASCAL FROM "SetPrinterParamInt" LIB hRTFLib
DLL32 FUNCTION RTFSetDefaultDirectory(hRTFPrinter AS LONG, cRTFParam AS LPSTR) AS LONG;
PASCAL FROM "SetDefaultDirectory" LIB hRTFLib
static hRtfLib
static hRtfPrinter
static cRtfPrinter
static lGuest
hRTFLib = LOADLIB32( "cdintf.dll" )
cRtfPrinter="SXP Printer"
hRTFPrinter:=RTFDriverOpen(cRTFPrinter)
*********
&& qui voglio richiamare la funzione per conoscere la versione
******
FREELIBRARY(HRTFLIB)
*********************
** amyuni wrapper **
*********************
DLL32 FUNCTION RtfDriverInit( cPrinterName AS LPSTR ) AS LONG;
PASCAL FROM "RTFDriverInit" LIB hRTFLib
DLL32 FUNCTION RtfDriverOpen( cPrinterName AS LPSTR ) AS LONG;
PASCAL FROM "DriverInit" LIB hRTFLib
DLL32 FUNCTION RtfDriverEnd(hRTFPrinter AS LONG) AS VOID;
PASCAL FROM "DriverEnd" LIB hRTFLib
DLL32 FUNCTION RtfSetDefaultPrinter(hRTFPrinter AS LONG) AS LONG;
PASCAL FROM "SetDefaultPrinter" LIB hRTFLib
DLL32 FUNCTION RtfSetDefaultConfig(hRTFPrinter AS LONG) AS LONG;
PASCAL FROM "SetDefaultConfig" LIB hRTFLib
DLL32 FUNCTION RtfRestoreDefaultPrinter(hRTFPrinter AS LONG) AS LONG;
PASCAL FROM "RestoreDefaultPrinter" LIB hRTFLib
DLL32 FUNCTION RtfSetHorizontalMargin(hRTFPrinter AS LONG, nMargin AS LONG) AS LONG;
PASCAL FROM "SetHorizontalMargin" LIB hRTFLib
DLL32 FUNCTION RtfSetVerticalMargin(hRTFPrinter AS LONG, nMargin AS LONG) AS LONG;
PASCAL FROM "SetVerticalMargin" LIB hRTFLib
DLL32 FUNCTION EnablePrinter(hRTFPrinter AS LONG, cRTFCompany AS LPSTR, cRTFCode AS LPSTR) AS LONG;
PASCAL FROM "EnablePrinter" LIB hRTFLib
DLL32 FUNCTION RTFSetDefaultFileName(hRTFPrinter AS LONG, cRTFCompany AS LPSTR) AS LONG;
PASCAL FROM "SetDefaultFileName" LIB hRTFLib
DLL32 FUNCTION RTFFileNameOptions(hRTFPrinter AS LONG, nRTFOption AS _INT) AS LONG;
PASCAL FROM "SetFileNameOptions" LIB hRTFLib
DLL32 FUNCTION RTFSetPrinterParam(hRTFPrinter AS LONG, cRTFParam AS LPSTR, nRTFValue AS LONG) AS _INT;
PASCAL FROM "SetPrinterParamInt" LIB hRTFLib
DLL32 FUNCTION RTFSetDefaultDirectory(hRTFPrinter AS LONG, cRTFParam AS LPSTR) AS LONG;
PASCAL FROM "SetDefaultDirectory" LIB hRTFLib
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact: