IVsFontAndColorStorage.OpenCategory(Guid, UInt32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Opens the registry key containing font and color information for a Cateogry found in the Show Settings for: drop-down list.
public:
int OpenCategory(Guid % rguidCategory, System::UInt32 fFlags);
public int OpenCategory (ref Guid rguidCategory, uint fFlags);
abstract member OpenCategory : Guid * uint32 -> int
Public Function OpenCategory (ByRef rguidCategory As Guid, fFlags As UInteger) As Integer
Parameters
- rguidCategory
- Guid
[in] Specifies the GUID of the Category of Display Items whose information is to be accessed.
- fFlags
- UInt32
[in] Specifies how a Category's information is to be accessed. Values are taken from the __FCSTORAGEFLAGS enumeration.
Returns
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.