An OLE component can implement an interface without implementing all the semantics of every method in the interface, instead returning E_NOTIMPL or S_OK as appropriate. The following table describes those methods that an ActiveX control container is not required to implement (i.e. the control container can return E_NOTIMPL).
The table below describes optional methods; note that the method must still exist, but can simply return E_NOTIMPL instead of implementing real semantics. Note that any method from a mandatory interface that is not listed below must be considered mandatory and may not return E_NOTIMPL.
IOleClientSite
| Method |
Comments |
SaveObject
|
Necessary for persistence to be successfully supported.
|
GetMoniker
|
Necessary only if the container supports linking to controls within its own form or document.
|
IOleInPlaceSite
IOleControlSite
IDispatch (Ambient properties)
| Method |
Comments |
GetTypeInfoCount
|
Necessary for containers that support non-standard ambient properties.
|
GetTypeInfo
|
Necessary for containers that support non-standard ambient properties.
|
GetIDsOfNames
|
Necessary for containers that support non-standard ambient properties.
|
IDispatch (Event sink)
| Method |
Comments |
GetTypeInfoCount
|
The control knows its own type information, so it has no need to call this.
|
GetTypeInfo
|
The control knows its own type information, so it has no need to call this.
|
GetIDsOfNames
|
The control knows its own type information, so it has no need to call this.
|
IOleInPlaceFrame
IOleContainer
| Method |
Comments |
ParseDisplayName
|
Only if linking to controls or other embeddings in the container is supported, as this is necessary for moniker binding.
|
LockContainer
|
As for ParseDisplayName
|
EnumObjects
|
Returns all ActiveX controls through an enumerator with IEnumUnknown, but not necessarily all objects (because there's no guarantee that all objects are ActiveX controls; some may be regular Windows controls).
|
-
Containers