Delphi ActiveX. , , COM, ActiveX OLE.
, COM (Component Object Model) - . ActiveX OLE. OLE ActiveX - . TObject, VCL Delphi. OLE ActiveX.
API . .
-. - Delphi. VCL Delphi, - , .
- . .
:
- - . , - ;
- - Windows. Delphi, Visual C++, C++Builder, Visual Basic, .
, , . , Windows Intel.
- DLL OCX. -, -.
, - .
- ( , OLE32.DLL OLE-Aut32.DLL). - , -, API, -.
Delphi Delphi ActiveX (Delphi ActiveX framework, DAX). DAX Axctris.
, Microsoft, Windows, , Windows.
, (Dynamic Data Exchange, DDE).
(Object Linking and Embedding, OLE). OLE 1 . OLE 2. . 1996 , ActiveX, (OLE-), , , Web- . .
.
- , - .
- , -. -. -, . - . - , Object Pascal.
- -. -, - . - I. , -. , lunknown, -.
- , - . , - .
- (coclass) - , -. - , - -. - (CLSID).
- . - , -. , , , , -. , -.
TLB.
DCOM (Distributed COM) - -. -, ( Internet).
Windows NT 4 Windows 98 DCOM.
- . , -. DLL, -, . . -. - , , -, , .
- . , - - . - - . , -, .
, , OLE-. , OLE-, OLE- (OLE container). , OLE-, OLE- (OLE server).
, OLE-, . , , ActiveX- (ActiveX document).
, , .
- :
- -;
- -;
- -.
- .
-. -- , () . . 3.1 -.
. 3.1. -
-, - -. lUnknown -.
, - - lUnknown, .
, - , - .
- .
- , . , . .
- , I, IPersist, IMalloc.
- , (Globally Unique Identifier, GUID). (Interface Identifiers, IIDs). .
- . -. , .
- , . , , .
- Iunknown.
lunknown . , , lunknown ( -). lunknown AddRef. - Release, .
Querylnterface Iunknown IID, TGUID, . . . out , NH. , . 3.1.
3.1. , Queryinterface
|
|
||
S_OK |
|
||
E_NOINTERFACE |
|
||
E_UNEXPECTED |
|
||
- 32- , , , . , vtable. vtable Object Pascal.
. 3.2. -
- . 3.2.
- , - . - -, - , .
- . - ., , - , -. -.
-, - (CLSID). CLSID - GUID, -. CLSID, - (. ), -.
, - :
- Windows (CLSID);
- -, -;
- , , .
- - Delphi , . .
- coclass. , Coclass - , . - , coclass. Cociass , .
- -, IclassFactory , .
IclassFactory Delphi ActiveX :
type
IClassFactory = interface (IUnknown)
['{00000001-0000-0000-COOO-000000000046}']
function Createlnstance (const unkOuter: lUnknown; const iid: TIID out obj): HResult; stdcall;
function LockServer (fLock: BOOL): HResult; stdcall;
end;
, :
Createlnstance LockServer.
Createlnstance - .
LockServer - . fLock true, , - . , .
, - , . - , . coclass CLSID. CLSID cociass , , . , DLL, , .
- Delphi .
, , . , . , . , , , , . :
- (In-process server);
- (Local server, Out-of-process server);
- (Remote server).
- DLL, . , ActiveX, Web- Internet Explorer Netscape Navigator. ActiveX , Web. - -. . 3.3. .
. 3.3.
- :
function DllRegisterServer: HResult; stdcall;
function DllUnregisterServer: HResult; stdcall;
function DllGetClassObject (const CLSID, IID: TGUID; var Obj): HResult;
stdcall;
function DllCanUnloadNow: HResult; stdcall;
comserv, exports .
:
- DllRegisterServer - DLL - Windows. - HKEY_CZASSES_ROOT\CLSID\{XXXXXXXX-XXXX-XXXX-xxxx-xxxxxxxx}, , , CLSID -. inProcserver32. DLL (. 3.4).
- DllUnregisterServer - , , DllRegisterServer DLL -.
- DllGetclassObject - -.
- DllcanUnloadNow - , DLL - . , - DLL, , S_FALSE, . . DLL . - DLL , SJTRUE.
. 3.4. -
- , , . , Microsoft Excel Microsoft Word. . .
, , , () (In-process proxy) . , , , , , ' . , , . , , , (marshaling).
:
- ;
- , .
, - . , . . (stub) , -.
, - , - .
. , IDispatch. (Remote Procedure Call, RFC).
. 3.5 , , , .
. 3.5.
- Windows , -.
- DLL , . . , , Delphi, . - (Distributed COM, DCOM) .
. . - , - DCOM. . 3.6.
. 3.6.
- , -, , , -.
- (Automation Controller). - , . , .
. . , .
ActiveX - , , . , . Internet/Intranet, , .
ActiveX - . . 3.2 .
. 3.2 - . , .
3.2.
|
|
||
(Automation servers) |
- , . , - |
||
- (Automation Controllers, COM Clients) |
- . |
||
ActiveX (ActiveX Controls) |
ActiveX (in-process COM servers). ActiveX - |
||
(Type Libraries) |
, . . ActiveX |
||
(Active Server Pages) |
- ActiveX, Web- |
||
(Active Documents) |
- , , , (drag-and-drop). Microsoft Word Microsoft Excel |
||
(Visual Cross-process Objects) |
- , |
||
. 3.7 , .
- , . - , . - - , - ,,.
. 3.3 .
. 3.7. ,
3.3.
- |
- |
|
|
|
||
(Active Document) |
|
|
OLE |
|
||
(Automation) |
, |
, |
IDispatch |
|
||
ActiveX (ActiveX Control) |
|
|
IDispatch |
|
||
|
|
|
|
|
||
|
|
, |
, - |
|
||
10.11.2021 - 12:37: - Personalias -> WHO IS WHO - - _. 10.11.2021 - 12:36: - Conscience -> . ? - _. 10.11.2021 - 12:36: , , - Upbringing, Inlightening, Education -> ... - _. 10.11.2021 - 12:35: - Ecology -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> . - _. 10.11.2021 - 12:34: , , - Upbringing, Inlightening, Education -> , - _. 10.11.2021 - 09:18: - New Technologies -> , 5G- - _. 10.11.2021 - 09:18: - Ecology -> - _. 10.11.2021 - 09:16: - Ecology -> - _. 10.11.2021 - 09:15: , , - Upbringing, Inlightening, Education -> - _. 10.11.2021 - 09:13: , , - Upbringing, Inlightening, Education -> - _. |