Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to get a CDI dll to work
Message
De
28/12/1999 16:03:39
 
 
À
28/12/1999 14:15:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00309328
Message ID:
00309468
Vues:
43
>>
>>* 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
Well, I tried to use what you suggested and this time I got:

Declare DLL call caused an exception. (Error 2027)
The parameters passed to a DLL caused an exception in the DLL.

Make sure that you pass all the necessary parameters to the DLL and that the parameters are of the proper type.


Terry
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform