OleCreateDefaultHandler
Creates a new instance of the default embedding handler. This instance is
initialized so it creates a local server when the embedded object enters the
running state.
HRESULT OleCreateDefaultHandler(
REFCLSID clsid,
| //Identifies OLE server to be loaded
|
LPUNKNOWN pUnkOuter,
| //Controlling unknown if aggregated; else NULL
|
REFIID riid,
| //Interface for communicating with handler
|
LPVOID FAR *lplpvObj
| //Receives pointer to interface on handler
|
);
|
|
Parameters
clsid
Specifies CLSID identifying the OLE server to be loaded when the embedded
object enters the running state.
pUnkOuter
Points to the controlling
IUnknown interface if the handler is to be aggregated; NULL if it is not to be
aggregated.
riid
Specifies the interface, usually
IID_IOleObject, through which the caller will communicate with the handler.
lplpObj
On return, receives a pointer to the interface requested in
riid on the newly created handler.
Return Values
E_OUTOFMEMORY
Indicates a handler cannot be created because the system is out of memory
NOERROR
Indicates the creation operation was successful.
Comments
OleCreateDefaultHandler creates a new instance of the default embedding handler, initialized so it
creates a local server identified by the
clsid parameter when the embedded object enters the running state.
If the given object definition does not have a special handler, a call to
OleCreateDefaultHandler produces the same results as a call to the
CoCreateInstance function with the class context parameter assigned the value
CLSCTX_INPROC_HANDLER.
When to Use
If you are writing a handler and want to use the services of the default
handler, call
OleCreateDefaultHandler. OLE also calls it internally when the CLSID specified in an object creation
call is not registered.
See Also
CoCreateInstance,
CLSCTX
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database