IVsFontAndColorStorage.OpenCategory Method
Opens the registry key containing font and color information for a Cateogry found in the Show Settings for: drop-down list.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function OpenCategory ( _
ByRef rguidCategory As Guid, _
fFlags As UInteger _
) As Integer
int OpenCategory(
ref Guid rguidCategory,
uint fFlags
)
int OpenCategory(
[InAttribute] Guid% rguidCategory,
[InAttribute] unsigned int fFlags
)
abstract OpenCategory :
rguidCategory:Guid byref *
fFlags:uint32 -> int
function OpenCategory(
rguidCategory : Guid,
fFlags : uint
) : int
Parameters
rguidCategory
Type: Guid%[in] Specifies the GUID of the Category of Display Items whose information is to be accessed.
fFlags
Type: UInt32[in] Specifies how a Category's information is to be accessed. Values are taken from the __FCSTORAGEFLAGS enumeration.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsFontAndColorStorage::OpenCategory(
[in] REFGUID rguidCategory,
[in] FCSTORAGEFLAGS fFlags
);
The current modification state of a Category and its Display Items is stored under [HKLM\SOFTWARE\Microsoft \Visual Studio\<Visual Studio version>\FontAndColors\<Category>]
Where <Category> is specify by the rguidCategory parameter.
A registry entry opened by a call to IVsFontAndColorStorage.OpenCategory closes automatically when:
CloseCategory is explicitly called.
The current instance of the IVsFontAndColorStorage interface is destroyed or
OpenCategory is called for a different Category.
Explicitly closing entries by calling CloseCategory is good practice as it ensures that no code reads from or writes to a Category that it is not supposed to.
.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.
See Also
Reference
IVsFontAndColorStorage Interface