共用方式為


IVsFontAndColorCacheManager.CheckCacheable(Guid, Int32) Method

Definition

Determines if a given Category's state can be cached.

public:
 int CheckCacheable(Guid % rguidCategory, [Runtime::InteropServices::Out] int % pfCacheable);
public int CheckCacheable (ref Guid rguidCategory, out int pfCacheable);
abstract member CheckCacheable : Guid * int -> int
Public Function CheckCacheable (ByRef rguidCategory As Guid, ByRef pfCacheable As Integer) As Integer

Parameters

rguidCategory
Guid

[in] Specifies the GUID of the Category of Display Items whose caching state is being checked.

pfCacheable
Int32

[out] Flag indicating if a Category's default Fonts and Colors state can be cached.If pfHasData is true, the Category's state can be cached.If pfHasData is false, the Category's state cannot be cached.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

By default, the Fonts and Colors state of all categories is cacheable.

However, a VSPackage can prevent their settings from being cached by creating a registry the registry entry [HKLM\SOFTWARE\Microsoft \Visual Studio\<Visual Studio version>\FontAndColors\*<Category>\*Cacheable] and settings its value to 0.

Here <Category> is the non-localized name of the category and <Version> is the version of Visual Studio, for example 8.0.

Note

The root path of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\<Version> can be overridden with an alternate root when the Visual Studio shell is initialized. For more information see, Command-Line Switches.

COM Signature

From vsshell80.idl:

HRESULT IVsFontAndColorCacheManager::CheckCacheable(  
   [in] REFGUID rguidCategory,  
   [out] BOOL *pfCacheable  
);  

Applies to