ocx导入后的pas中的interface如何使用的问题,pdf.ocx。(50)

  • 主题发起人 主题发起人 xounter
  • 开始时间 开始时间
X

xounter

Unregistered / Unconfirmed
GUEST, unregistred user!
我想用一个ocx控件,导入ide后,给了我一个pas,我在我的unit里声明后,调用时总是提示错误。可是我用pda.loadfile('d:/1.pdf').总是报错。应该如何调用?这是我导入的那个pas文件,谁能帮我看看应该如何使用?我可以单开帖子在给分~非常感谢!!http://www.delphibbs.com/delphibbs/dispq.asp?lid=3986050 这两个帖子我可以同时给分。unit AcroPDFLib_TLB;
// ************************************************************************ // // WARNING // ------- // The types declared in this file were generated from data read from a // Type Library. If this type library is explicitly or indirectly (via // another type library referring to this type library) re-imported, or the // 'Refresh' command of the Type Library Editor activated while editing the // Type Library, the contents of this file will be regenerated and all // manual modifications will be lost. // ************************************************************************ // // $Rev: 17244 $ // File generated on 2010-1-13 14:58:56 from Type Library described below. // ************************************************************************ // // Type Lib: C:/Program Files/Adobe/Acrobat 7.0/ActiveX/AcroPDF.dll (1) // LIBID: {05BFD3F1-6319-4F30-B752-C7A22889BCC4} // LCID: 0 // Helpfile: // HelpString: Adobe Acrobat 7.0 Browser Control Type Library 1.0 // DepndLst: // (1) v2.0 stdole, (C:/WINDOWS/system32/stdole2.tlb) // Errors: // Hint: Parameter 'On' of IAcroAXDocShim.setShowToolbar changed to 'On_' // Hint: Parameter 'to' of IAcroAXDocShim.printPages changed to 'to_' // Hint: Parameter 'to' of IAcroAXDocShim.printPagesFit changed to 'to_' // Hint: Parameter 'On' of IAcroAXDocShim.setShowScrollbars changed to 'On_' // ************************************************************************ // {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. {$WARN SYMBOL_PLATFORM OFF} {$WRITEABLECONST ON} {$VARPROPSETTER ON} {$ALIGN 4} interface uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, Variants;
// *********************************************************************// // GUIDS declared in the TypeLibrary. Following prefixes are used: // Type Libraries : LIBID_xxxx // CoClasses : CLASS_xxxx // DISPInterfaces : DIID_xxxx // Non-DISP interfaces: IID_xxxx // *********************************************************************// const // TypeLibrary Major and minor versions AcroPDFLibMajorVersion = 1;
AcroPDFLibMinorVersion = 0;
LIBID_AcroPDFLib: TGUID = '{05BFD3F1-6319-4F30-B752-C7A22889BCC4}';
DIID__IAcroAXDocShimEvents: TGUID = '{E790E1D1-9DE8-4853-8AC6-933D4FD9C927}';
IID_IAcroAXDocShim: TGUID = '{3B813CE7-7C10-4F84-AD06-9DF76D97A9AA}';
CLASS_AcroPDF: TGUID = '{CA8A9780-280D-11CF-A24D-444553540000}';
type // *********************************************************************// // Forward declaration of types defined in TypeLibrary // *********************************************************************// _IAcroAXDocShimEvents = dispinterface;
IAcroAXDocShim = interface;
IAcroAXDocShimDisp = dispinterface;
// *********************************************************************// // Declaration of CoClasses defined in Type Library // (NOTE: Here we map each CoClass to its Default Interface) // *********************************************************************// AcroPDF = IAcroAXDocShim;
// *********************************************************************// // DispIntf: _IAcroAXDocShimEvents // Flags: (4096) Dispatchable // GUID: {E790E1D1-9DE8-4853-8AC6-933D4FD9C927} // *********************************************************************// _IAcroAXDocShimEvents = dispinterface ['{E790E1D1-9DE8-4853-8AC6-933D4FD9C927}'] end;

// *********************************************************************// // Interface: IAcroAXDocShim // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable // GUID: {3B813CE7-7C10-4F84-AD06-9DF76D97A9AA} // *********************************************************************// IAcroAXDocShim = interface(IDispatch) ['{3B813CE7-7C10-4F84-AD06-9DF76D97A9AA}'] function Get_src: WideString;
safecall;
procedure Set_src(const pVal: WideString);
safecall;
function LoadFile(const fileName: WideString): WordBool;
safecall;
procedure setShowToolbar(On_: WordBool);
safecall;
procedure gotoFirstPage;
safecall;
procedure gotoLastPage;
safecall;
procedure gotoNextPage;
safecall;
procedure gotoPreviousPage;
safecall;
procedure setCurrentPage(n: Integer);
safecall;
procedure goForwardStack;
safecall;
procedure goBackwardStack;
safecall;
procedure setPageMode(const pageMode: WideString);
safecall;
procedure setLayoutMode(const layoutMode: WideString);
safecall;
procedure setNamedDest(const namedDest: WideString);
safecall;
procedure Print;
safecall;
procedure printWithDialog;
safecall;
procedure setZoom(percent: Single);
safecall;
procedure setZoomScroll(percent: Single;
left: Single;
top: Single);
safecall;
procedure setView(const viewMode: WideString);
safecall;
procedure setViewScroll(const viewMode: WideString;
offset: Single);
safecall;
procedure setViewRect(left: Single;
top: Single;
width: Single;
height: Single);
safecall;
procedure printPages(from: Integer;
to_: Integer);
safecall;
procedure printPagesFit(from: Integer;
to_: Integer;
shrinkToFit: WordBool);
safecall;
procedure printAll;
safecall;
procedure printAllFit(shrinkToFit: WordBool);
safecall;
procedure setShowScrollbars(On_: WordBool);
safecall;
function GetVersions: OleVariant;
safecall;
procedure setCurrentHightlight(a: Integer;
b: Integer;
c: Integer;
d: Integer);
safecall;
procedure setCurrentHighlight(a: Integer;
b: Integer;
c: Integer;
d: Integer);
safecall;
property src: WideString read Get_src write Set_src;
end;

// *********************************************************************// // DispIntf: IAcroAXDocShimDisp // Flags: (4544) Dual NonExtensible OleAutomation Dispatchable // GUID: {3B813CE7-7C10-4F84-AD06-9DF76D97A9AA} // *********************************************************************// IAcroAXDocShimDisp = dispinterface ['{3B813CE7-7C10-4F84-AD06-9DF76D97A9AA}'] property src: WideString dispid 1;
function LoadFile(const fileName: WideString): WordBool;
dispid 2;
procedure setShowToolbar(On_: WordBool);
dispid 3;
procedure gotoFirstPage;
dispid 4;
procedure gotoLastPage;
dispid 5;
procedure gotoNextPage;
dispid 6;
procedure gotoPreviousPage;
dispid 7;
procedure setCurrentPage(n: Integer);
dispid 8;
procedure goForwardStack;
dispid 9;
procedure goBackwardStack;
dispid 10;
procedure setPageMode(const pageMode: WideString);
dispid 11;
procedure setLayoutMode(const layoutMode: WideString);
dispid 12;
procedure setNamedDest(const namedDest: WideString);
dispid 13;
procedure Print;
dispid 14;
procedure printWithDialog;
dispid 15;
procedure setZoom(percent: Single);
dispid 16;
procedure setZoomScroll(percent: Single;
left: Single;
top: Single);
dispid 17;
procedure setView(const viewMode: WideString);
dispid 18;
procedure setViewScroll(const viewMode: WideString;
offset: Single);
dispid 19;
procedure setViewRect(left: Single;
top: Single;
width: Single;
height: Single);
dispid 20;
procedure printPages(from: Integer;
to_: Integer);
dispid 21;
procedure printPagesFit(from: Integer;
to_: Integer;
shrinkToFit: WordBool);
dispid 22;
procedure printAll;
dispid 23;
procedure printAllFit(shrinkToFit: WordBool);
dispid 24;
procedure setShowScrollbars(On_: WordBool);
dispid 25;
function GetVersions: OleVariant;
dispid 26;
procedure setCurrentHightlight(a: Integer;
b: Integer;
c: Integer;
d: Integer);
dispid 27;
procedure setCurrentHighlight(a: Integer;
b: Integer;
c: Integer;
d: Integer);
dispid 28;
end;

implementation uses ComObj;
end.
 
有没有人能给看看?
 
后退
顶部