紧急求救:PB调用dll的问题
源文件的说明如下:
OpenPDF(filename, ignore protect, user pass, owner pass, pdf handle )
Description:
Opens the PDF file for reading and loads the catalog of the pdf for information on the document (such as
number of pages).
Input Fields:
Filename Char * Contains the full path and filename for the input PDF file.
Ignore Protect BOOL TRUE – Ignores password protection on the PDF
FALSE – Passwords will be used (if needed)
User password Char * Password for the person USING the pdf
Owner password Char * Password for the creator of the pdf
Pdf Handle long * Handle for the open PDF
Return codes:
LONG Status returned:
0 – success
1 - couldn't open the PDF file
2 - couldn't read the page catalog
3 - PDF file is damaged
4 - file is encrypted and password was incorrect or not supplied
5 – User does not have permission to read
Usage:
long pdf;
long status;
status = OpenPDF("input.pdf", TRUE, NULL, NULL, &pdf );
我在pb中的使用过程如下
外部声明:
Function long OpenPDF(string filename, Boolean protect, Boolean userpass, Boolean ownerpass, ref long pdfhandle) Library "SII_PDF.dll"
使用方式如下:
long flag1,flag2
long pdfhandle
string ls_s
ls_s="d:\save\00967.pdf"
string ls_m
ls_m='d:\save\00967.txt'
flag1 =OpenPDF(ls_s, TRUE, false, false , pdfhandle)
flag2=ConvertPDFToTextFile(0, 0, pdfhandle, ls_m)
messagebox(string(flag1),flag2)
语法正确,但是运行到时提示错误