IVsFontAndColorCacheManager.CheckCacheable Method
Determines if a given Category's state can be cached.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'宣告
Function CheckCacheable ( _
ByRef rguidCategory As Guid, _
<OutAttribute> ByRef pfCacheable As Integer _
) As Integer
'用途
Dim instance As IVsFontAndColorCacheManager
Dim rguidCategory As Guid
Dim pfCacheable As Integer
Dim returnValue As Integer
returnValue = instance.CheckCacheable(rguidCategory, _
pfCacheable)
int CheckCacheable(
ref Guid rguidCategory,
out int pfCacheable
)
int CheckCacheable(
[InAttribute] Guid% rguidCategory,
[OutAttribute] int% pfCacheable
)
abstract CheckCacheable :
rguidCategory:Guid byref *
pfCacheable:int byref -> int
function CheckCacheable(
rguidCategory : Guid,
pfCacheable : int
) : int
Parameters
- rguidCategory
Type: System.Guid%
[in] Specifies the GUID of the Category of Display Items whose caching state is being checked.
- pfCacheable
Type: System.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.
Return Value
Type: System.Int32
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.
注意
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 (Visual Studio SDK).
COM Signature
From vsshell80.idl:
HRESULT IVsFontAndColorCacheManager::CheckCacheable(
[in] REFGUID rguidCategory,
[out] BOOL *pfCacheable
);
.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
IVsFontAndColorCacheManager Interface
IVsFontAndColorCacheManager Members
Microsoft.VisualStudio.Shell.Interop Namespace