IVsUserContext.CountAttributes(String, Int32, Int32) 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.
Returns the number of attributes or keywords present in the context or subcontext bag.
public:
int CountAttributes(System::String ^ pszName, int fIncludeChildren, [Runtime::InteropServices::Out] int % pc);
int CountAttributes(std::wstring const & pszName, int fIncludeChildren, [Runtime::InteropServices::Out] int & pc);
public int CountAttributes (string pszName, int fIncludeChildren, out int pc);
abstract member CountAttributes : string * int * int -> int
Public Function CountAttributes (pszName As String, fIncludeChildren As Integer, ByRef pc As Integer) As Integer
Parameters
- pszName
- String
[in] Attribute name or keyword. Specify the attribute name to determine the number of attributes of a given name in the context bag. Specify "keyword" to determine the number of F1 or lookup keywords in the context or subcontext bag.
- fIncludeChildren
- Int32
[in] If true
, then the number of subcontext attributes or keywords are also returned in the count. If false
, then the subcontext is excluded from the count.
- pc
- Int32
[out, retval] Pointer to an integer that indicates the number of attributes of a specific name or the number of keywords.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From context.idl:
HRESULT IVsUserContext::CountAttributes(
[in] LPCOLESTR pszName,
[in] BOOL fIncludeChildren,
[out, retval] int * pc
);
Use this method to determine the number of attributes of a specific name, or the number of keywords present in the context or subcontext bag. If you set the fIncludeChildren
parameter to true
, then this method also includes in the count the number of attributes or keywords present in any subcontext bags associated with the context bag. The value of the fIncludeChildren
parameter has no effect if the context bag does not have any subcontext.