大侠给翻译下这几个函数吧 ( 积分: 200 )

  • 主题发起人 主题发起人 shuihan20e
  • 开始时间 开始时间
S

shuihan20e

Unregistered / Unconfirmed
GUEST, unregistred user!
Public Declare Function pdfOpenPDF Lib "SII_PDF.DLL" Alias "_OpenPDF@20" (ByVal sFileName As String, _
ByVal bIgnoreProtect As Boolean, _
ByVal sUserPassword As String, _
ByVal sOwnerPassword As String, _
ByRef lHandle As Long) As Long

Public Declare Function pdfConvertPDFToTextFile Lib "SII_PDF.DLL" Alias "_ConvertPDFToTextFile@16" ( _
ByVal lFirstPage As Long, _
ByVal lLastPage As Long, _
ByRef lPDFHandle As Long, _
ByVal sOutputFile As String) As Long

Public Declare Function pdfConvertPDFToText Lib "SII_PDF.DLL" Alias "_ConvertPDFToText@20" ( _
ByVal lFirstPage As Long, _
ByVal lLastPage As Long, _
ByRef lPDFHandle As Long, _
ByVal sBuffer As String, _
ByVal lSize As Long) As Long
 
不明白楼主的意思,VB代码转Delphi代码?
你可以查查delphi中如何动态,静态装载DLL文件;

PDF文件转文本文件的动态库?
 
楼上给翻译下吧,谢谢,新手求教啊[:(]
 
高手快来帮忙啊[:(]
 
關注中。。。。。
 
const SII_PDF_DLL='SII_PDF.DLL';

function pdfOpenPDF(sFileName : PChar; bIgnoreProtect : Boolean; sUserPassword, sOwnerPassword : PChar; out lHandle : LongInt) : LongInt; StdCall; external SII_PDF_DLL name '_OpenPDF@20';
function pdfConvertPDFToTextFile(lFirstPage, lLastPage : LongInt; out lPDFHandle : LongInt; sOutputFile : PChar) : LongInt; StdCall; external SII_PDF_DLL name '_ConvertPDFToTextFile@16';
function pdfConvertPDFToText(lFirstPage, lLastPage : LongInt; out lPDFHandle : LongInt; sBuffer : PChar; lSize : LongInt) : LongInt; StdCall; external SII_PDF_DLL name '_ConvertPDFToText@20';
 
to xianguo;
可否给下调用方式?[:D]
 
var
sFileName, sUserPassword, sOwnerPassword : string;
bIgnoreProtect : Boolean;
iRet, lHandle : LongInt;
begin
...
iRet := pdfOpenPDF(PChar(sFileName), bIgnoreProtect, PChar(sUserPassword), PChar(sOwnerPassword), lHandle);
...
end;
 
后退
顶部