OALib_TLB.pas
上传用户:yjb1804
上传日期:2021-01-30
资源大小:3105k
文件大小:12k
- unit OALib_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.
- // ************************************************************************ //
- // PASTLWTR : 1.2
- // File generated on 2006-9-19 13:13:56 from Type Library described below.
- // ************************************************************************ //
- // Type Lib: E:OA ProjectOA3.0_newOA.ocx (1)
- // LIBID: {0DB2A541-9FC9-41FE-8869-62AF866AA3F8}
- // LCID: 0
- // Helpfile: E:OA ProjectOA3.0_newOA.hlp
- // HelpString: OA ActiveX Control module
- // DepndLst:
- // (1) v2.0 stdole, (C:WINDOWSsystem32stdole2.tlb)
- // ************************************************************************ //
- {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
- {$WARN SYMBOL_PLATFORM OFF}
- {$WRITEABLECONST ON}
- {$VARPROPSETTER ON}
- 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
- OALibMajorVersion = 1;
- OALibMinorVersion = 0;
- LIBID_OALib: TGUID = '{0DB2A541-9FC9-41FE-8869-62AF866AA3F8}';
- DIID__DOA: TGUID = '{16EFE4A7-6641-459C-8BB3-B02AC6F088F4}';
- DIID__DOAEvents: TGUID = '{4D0D660E-90A7-4CDC-AF8C-1926E0D08895}';
- CLASS_OA: TGUID = '{18A295DA-088E-42D1-BE31-5028D7F9B9B5}';
- type
- // *********************************************************************//
- // Forward declaration of types defined in TypeLibrary
- // *********************************************************************//
- _DOA = dispinterface;
- _DOAEvents = dispinterface;
- // *********************************************************************//
- // Declaration of CoClasses defined in Type Library
- // (NOTE: Here we map each CoClass to its Default Interface)
- // *********************************************************************//
- OA = _DOA;
- // *********************************************************************//
- // Declaration of structures, unions and aliases.
- // *********************************************************************//
- POleVariant1 = ^OleVariant; {*}
- // *********************************************************************//
- // DispIntf: _DOA
- // Flags: (4112) Hidden Dispatchable
- // GUID: {16EFE4A7-6641-459C-8BB3-B02AC6F088F4}
- // *********************************************************************//
- _DOA = dispinterface
- ['{16EFE4A7-6641-459C-8BB3-B02AC6F088F4}']
- function CreateNew(const ProgId: WideString): WordBool; dispid 8;
- function GetIDispatch: IDispatch; dispid 5;
- function Close: WordBool; dispid 7;
- function DoOleCommand(dwOleCmdID: Integer; dwOptions: Integer; var vInParam: OleVariant;
- var vInOutParam: OleVariant): WordBool; dispid 20;
- function IsDirty: WordBool; dispid 21;
- function OpenWebFile(const FileUrl: WideString): WordBool; dispid 9;
- function HttpUploadFile(const ServerUrl: WideString; const LocalFilePath: WideString): WordBool; dispid 10;
- function FTPUploadFile(const ServerUrl: WideString; const LocalFilePath: WideString;
- const UserName: WideString; const Password: WideString): WordBool; dispid 12;
- function Open(const Path: WideString): WordBool; dispid 6;
- function HttpDownloadFile(const ServerUrl: WideString; const LocalFileUrl: WideString): WordBool; dispid 11;
- function FTPDownloadFile(const ServerUrl: WideString; const LocalFilePath: WideString;
- const UserName: WideString; const Password: WideString): WordBool; dispid 13;
- procedure Save(const strPath: WideString); dispid 14;
- function IsOpen: WordBool; dispid 18;
- function SaveLocalDialog: WordBool; dispid 16;
- function OpenLocalDialog: WordBool; dispid 17;
- procedure AboutBox; dispid -552;
- procedure SaveWebFile(const ServerUrl: WideString); dispid 19;
- function GetToolbarsIsShow: WordBool; dispid 23;
- procedure Print; dispid 15;
- procedure ShowToolbars(bShow: WordBool); dispid 22;
- property CaptionColor: OLE_COLOR dispid 4;
- property CaptionLabel: WideString dispid 3;
- property BorderColor: OLE_COLOR dispid 2;
- property BorderStyle: Smallint dispid 1;
- end;
- // *********************************************************************//
- // DispIntf: _DOAEvents
- // Flags: (4096) Dispatchable
- // GUID: {4D0D660E-90A7-4CDC-AF8C-1926E0D08895}
- // *********************************************************************//
- _DOAEvents = dispinterface
- ['{4D0D660E-90A7-4CDC-AF8C-1926E0D08895}']
- end;
- // *********************************************************************//
- // OLE Control Proxy class declaration
- // Control Name : TOffice
- // Help String : OA Control
- // Default Interface: _DOA
- // Def. Intf. DISP? : Yes
- // Event Interface: _DOAEvents
- // TypeFlags : (34) CanCreate Control
- // *********************************************************************//
- TOffice = class(TOleControl)
- private
- FIntf: _DOA;
- function GetControlInterface: _DOA;
- protected
- procedure CreateControl;
- procedure InitControlData; override;
- public
- function CreateNew(const ProgId: WideString): WordBool;
- function GetIDispatch: IDispatch;
- function Close: WordBool;
- function DoOleCommand(dwOleCmdID: Integer; dwOptions: Integer; var vInParam: OleVariant;
- var vInOutParam: OleVariant): WordBool;
- function IsDirty: WordBool;
- function OpenWebFile(const FileUrl: WideString): WordBool;
- function HttpUploadFile(const ServerUrl: WideString; const LocalFilePath: WideString): WordBool;
- function FTPUploadFile(const ServerUrl: WideString; const LocalFilePath: WideString;
- const UserName: WideString; const Password: WideString): WordBool;
- function Open(const Path: WideString): WordBool;
- function HttpDownloadFile(const ServerUrl: WideString; const LocalFileUrl: WideString): WordBool;
- function FTPDownloadFile(const ServerUrl: WideString; const LocalFilePath: WideString;
- const UserName: WideString; const Password: WideString): WordBool;
- procedure Save(const strPath: WideString);
- function IsOpen: WordBool;
- function SaveLocalDialog: WordBool;
- function OpenLocalDialog: WordBool;
- procedure AboutBox;
- procedure SaveWebFile(const ServerUrl: WideString);
- function GetToolbarsIsShow: WordBool;
- procedure Print;
- procedure ShowToolbars(bShow: WordBool);
- property ControlInterface: _DOA read GetControlInterface;
- property DefaultInterface: _DOA read GetControlInterface;
- published
- property Anchors;
- property TabStop;
- property Align;
- property DragCursor;
- property DragMode;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property TabOrder;
- property Visible;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnEnter;
- property OnExit;
- property OnStartDrag;
- property CaptionColor: TColor index 4 read GetTColorProp write SetTColorProp stored False;
- property CaptionLabel: WideString index 3 read GetWideStringProp write SetWideStringProp stored False;
- property BorderColor: TColor index 2 read GetTColorProp write SetTColorProp stored False;
- property BorderStyle: Smallint index 1 read GetSmallintProp write SetSmallintProp stored False;
- end;
- procedure Register;
- resourcestring
- dtlServerPage = 'ActiveX';
- dtlOcxPage = 'ActiveX';
- implementation
- uses ComObj;
- procedure TOffice.InitControlData;
- const
- CControlData: TControlData2 = (
- ClassID: '{18A295DA-088E-42D1-BE31-5028D7F9B9B5}';
- EventIID: '';
- EventCount: 0;
- EventDispIDs: nil;
- LicenseKey: nil (*HR:$80004005*);
- Flags: $00000000;
- Version: 401);
- begin
- ControlData := @CControlData;
- end;
- procedure TOffice.CreateControl;
- procedure DoCreate;
- begin
- FIntf := IUnknown(OleObject) as _DOA;
- end;
- begin
- if FIntf = nil then DoCreate;
- end;
- function TOffice.GetControlInterface: _DOA;
- begin
- CreateControl;
- Result := FIntf;
- end;
- function TOffice.CreateNew(const ProgId: WideString): WordBool;
- begin
- Result := DefaultInterface.CreateNew(ProgId);
- end;
- function TOffice.GetIDispatch: IDispatch;
- begin
- Result := DefaultInterface.GetIDispatch;
- end;
- function TOffice.Close: WordBool;
- begin
- Result := DefaultInterface.Close;
- end;
- function TOffice.DoOleCommand(dwOleCmdID: Integer; dwOptions: Integer; var vInParam: OleVariant;
- var vInOutParam: OleVariant): WordBool;
- begin
- Result := DefaultInterface.DoOleCommand(dwOleCmdID, dwOptions, vInParam, vInOutParam);
- end;
- function TOffice.IsDirty: WordBool;
- begin
- Result := DefaultInterface.IsDirty;
- end;
- function TOffice.OpenWebFile(const FileUrl: WideString): WordBool;
- begin
- Result := DefaultInterface.OpenWebFile(FileUrl);
- end;
- function TOffice.HttpUploadFile(const ServerUrl: WideString; const LocalFilePath: WideString): WordBool;
- begin
- Result := DefaultInterface.HttpUploadFile(ServerUrl, LocalFilePath);
- end;
- function TOffice.FTPUploadFile(const ServerUrl: WideString; const LocalFilePath: WideString;
- const UserName: WideString; const Password: WideString): WordBool;
- begin
- Result := DefaultInterface.FTPUploadFile(ServerUrl, LocalFilePath, UserName, Password);
- end;
- function TOffice.Open(const Path: WideString): WordBool;
- begin
- Result := DefaultInterface.Open(Path);
- end;
- function TOffice.HttpDownloadFile(const ServerUrl: WideString; const LocalFileUrl: WideString): WordBool;
- begin
- Result := DefaultInterface.HttpDownloadFile(ServerUrl, LocalFileUrl);
- end;
- function TOffice.FTPDownloadFile(const ServerUrl: WideString; const LocalFilePath: WideString;
- const UserName: WideString; const Password: WideString): WordBool;
- begin
- Result := DefaultInterface.FTPDownloadFile(ServerUrl, LocalFilePath, UserName, Password);
- end;
- procedure TOffice.Save(const strPath: WideString);
- begin
- DefaultInterface.Save(strPath);
- end;
- function TOffice.IsOpen: WordBool;
- begin
- Result := DefaultInterface.IsOpen;
- end;
- function TOffice.SaveLocalDialog: WordBool;
- begin
- Result := DefaultInterface.SaveLocalDialog;
- end;
- function TOffice.OpenLocalDialog: WordBool;
- begin
- Result := DefaultInterface.OpenLocalDialog;
- end;
- procedure TOffice.AboutBox;
- begin
- DefaultInterface.AboutBox;
- end;
- procedure TOffice.SaveWebFile(const ServerUrl: WideString);
- begin
- DefaultInterface.SaveWebFile(ServerUrl);
- end;
- function TOffice.GetToolbarsIsShow: WordBool;
- begin
- Result := DefaultInterface.GetToolbarsIsShow;
- end;
- procedure TOffice.Print;
- begin
- DefaultInterface.Print;
- end;
- procedure TOffice.ShowToolbars(bShow: WordBool);
- begin
- DefaultInterface.ShowToolbars(bShow);
- end;
- procedure Register;
- begin
- RegisterComponents(dtlOcxPage, [TOffice]);
- end;
- end.