Share via


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
'Usage
Dim instance As IVsFontAndColorStorage 
Dim rguidCategory As Guid 
Dim fFlags As UInteger 
Dim returnValue As Integer 

returnValue = instance.OpenCategory(rguidCategory, _
    fFlags)
int OpenCategory(
    ref Guid rguidCategory,
    uint fFlags
)
int OpenCategory(
    [InAttribute] Guid% rguidCategory, 
    [InAttribute] unsigned int fFlags
)
function OpenCategory(
    rguidCategory : Guid, 
    fFlags : uint
) : int

Parameters

  • rguidCategory
    Type: System.Guid%

    [in] Specifies the GUID of the Category of Display Items whose information is to be accessed.

  • fFlags
    Type: System.UInt32

    [in] Specifies how a Category's information is to be accessed. Values are taken from the __FCSTORAGEFLAGS enumeration.

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 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:

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

See Also

Reference

IVsFontAndColorStorage Interface

IVsFontAndColorStorage Members

Microsoft.VisualStudio.Shell.Interop Namespace

IVsFontAndColorStorage2