Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Allows a UI active VSPackage object to change the menus, toolbars, or commands that are displayed on its behalf by the environment.
Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function SetActiveUI ( _
    dwCompRole As UInteger, _
    ByRef rclsid As Guid, _
    cCmdGrpId As UInteger, _
    rgnCmdGrpId As Integer() _
) As Integer
int SetActiveUI(
    uint dwCompRole,
    ref Guid rclsid,
    uint cCmdGrpId,
    int[] rgnCmdGrpId
)
int SetActiveUI(
    [InAttribute] unsigned int dwCompRole, 
    [InAttribute] Guid% rclsid, 
    [InAttribute] unsigned int cCmdGrpId, 
    [InAttribute] array<int>^ rgnCmdGrpId
)
abstract SetActiveUI : 
        dwCompRole:uint32 * 
        rclsid:Guid byref * 
        cCmdGrpId:uint32 * 
        rgnCmdGrpId:int[] -> int
function SetActiveUI(
    dwCompRole : uint, 
    rclsid : Guid, 
    cCmdGrpId : uint, 
    rgnCmdGrpId : int[]
) : int
Parameters
- dwCompRole 
 Type: UInt32- [in] Role of the in-place object requesting the user interface change. For a list of valid dwCompRole values, see OLEROLE. 
- rclsid 
 Type: Guid%- [in] Class identifier (CLSID) of the in-place object requesting the change. 
- cCmdGrpId 
 Type: UInt32- [in] Count of the toolbars identified by rgnCmdGrpId. 
- rgnCmdGrpId 
 Type: array<Int32[]- [in] Array of identifiers of toolbars to be displayed in the update. 
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From oleipc.idl:
HRESULT IOleInPlaceComponentUIManager::SetActiveUI(
   [in] DWORD dwCompRole,
   [in] REFCLSID rclsid,
   [in] ULONG cCmdGrpId,
   [in] LONG *rgnCmdGrpId
);
.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.