Returns the GUID of the command associated with a change in UI context.
Assembly: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Packages may define a command that is associated with a change in UI context. Use UICONTEXT_CodeWindow to return the GUID of the command associated with this UI state. In this case the UI context is the switch to a code window. A successful call to GetCmdUIContextCookie with UICONTEXT_CodeWindow as the first parameter returns the GUID value of the command UI context associated with this specific UI state.
The new UI context (which in this case is UICONTEXT_CodeWindow) may be retrieved with a call to OnCmdUIContextChanged.
This method is not valid, and will return E_FAIL, when the IDE is in Command Line Mode.
- 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.