IOleInPlaceComponent.UseComponentUIManager Method
Informs an in-place object of its role in the environment, providing pointers to the IOleComponentUIManager and IOleInPlaceComponentSite interfaces.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function UseComponentUIManager ( _
dwCompRole As UInteger, _
<OutAttribute> ByRef pgrfCompFlags As UInteger, _
pCompUIMgr As IOleComponentUIManager, _
pIPCompSite As IOleInPlaceComponentSite _
) As Integer
int UseComponentUIManager(
uint dwCompRole,
out uint pgrfCompFlags,
IOleComponentUIManager pCompUIMgr,
IOleInPlaceComponentSite pIPCompSite
)
int UseComponentUIManager(
[InAttribute] unsigned int dwCompRole,
[OutAttribute] unsigned int% pgrfCompFlags,
[InAttribute] IOleComponentUIManager^ pCompUIMgr,
[InAttribute] IOleInPlaceComponentSite^ pIPCompSite
)
abstract UseComponentUIManager :
dwCompRole:uint32 *
pgrfCompFlags:uint32 byref *
pCompUIMgr:IOleComponentUIManager *
pIPCompSite:IOleInPlaceComponentSite -> int
function UseComponentUIManager(
dwCompRole : uint,
pgrfCompFlags : uint,
pCompUIMgr : IOleComponentUIManager,
pIPCompSite : IOleInPlaceComponentSite
) : int
Parameters
dwCompRole
Type: System.UInt32[in] Specifies the role that the in-place object is to assume in the environment. The default role is OLEROLE_COMPONENTCONTROL. For a list of all valid dwCompRole values, see OLEROLE.
pgrfCompFlags
Type: System.UInt32%[in] Flags specified by the in-place object to control interactions with the environment. For a list of pgrfCompFlags values, see OLECOMPFLAG.
pCompUIMgr
Type: Microsoft.VisualStudio.Shell.Interop.IOleComponentUIManager[in] Pointer to the environment's IOleComponentUIManager interface.
pIPCompSite
Type: Microsoft.VisualStudio.Shell.Interop.IOleInPlaceComponentSite[in] Pointer to the environment's IOleInPlaceComponentSite interface.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From oleipc.idl:
HRESULT IOleInPlaceComponent::UseComponentUIManager(
[in] DWORD dwCompRole,
[out] DWORD *pgrfCompFlags,
[in] IOleComponentUIManager *pCompUIMgr,
[in] IOleInPlaceComponentSite *pIPCompSite
);
The environment calls an in-place object's UseComponentUIManager method before the object becomes in-place active. In-place VSPackage objects activate by responding to methods such as DoVerb or UIActivate. UseComponentUIManager directs the in-place object to assume the role specified by the dwCompRole parameter.
In-place objects do not need to call UseComponentUIManager when they re-activate after having deactivated. They only need to call it a single time.
VSPackages typically implement UseComponentUIManager to use the pointer passed in the pCompUIMgr parameter to call QueryInterface and retrieve a pointer to the environment's IOleInPlaceComponentUIManager interface.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.