IVsFontAndColorStorage.OpenCategory Method (Guid, UInt32)
Opens the registry key containing font and color information for a Cateogry found in the Show Settings for: drop-down list.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
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.Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.