Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to get a CDI dll to work
Message
From
28/12/1999 14:15:12
 
 
To
28/12/1999 13:39:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00309328
Message ID:
00309345
Views:
45
>I am trying to check out Amyuni's Common Driver Interface DLL to work in a VFP application and having trouble. The dll contains a PDF printer interface for producing PDF reports.
>
>
>I tried to use the following code to initialize the printer. (This was the first step in my experiment):
>
>* This program will test the PDF printer Using the report
>* test which prints "test"
>DECLARE LONG PDFDriverInit IN "CDIntf.DLL"

You didn't declare the parameter passed; try:

DECLARE INTEGER PDFDriverInit IN "CDIntf.DLL" STRING @ szPrinter

>LOCAL lnResult, lcPrinterName
>lnResult = 0
>lcPrinterName = "PDFPrinter"
>lnResult = PDFDriverInit(lcPrinterName)
>?
>? lnResult
>?
>
>
>The following is a listing of the documentation on this function:
>
>PDFDriverInit( PrinterName )
>Return type : long
>Description : Initializes the PDF printer
>DLL call : HANDLE PDFDriverInit( LPTSTR szPrinter )
>The return value of this function is an internal data handle that is to be passed as a first parameter to
>all other functions. In the case of the ActiveX interface, this handle is not used.
>A return value of 0, indicates that an error occured. You can use the GetLastError Windows API to
>get the error code, or the GetLastErrorMsg CDI call to convert the error code to an error message.
>Note :
>This function is only available for developers who have licensed the "PDF Compatible Printer
>Driver". Developers using the standard version of this driver should use DriverInit instead.
>
>
>I tried to use a direct quoted name "PDFPrinter" between the ()s and got - "Too many arguments" I used nothing between the ()s and got - "Too few arguments" Finaly, I tried the above variable and got - "Too many arguments" again.
>
>Any ideas? This is the first time I have fooled with third party DLLs and so I am assuming I am making a Newbee mistake.
>
>Thanks
>Terry
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform