ITfCategoryMgr::FindClosestCategory method (msctf.h)
Finds the category closest to the specified GUID from a list of categories.
Syntax
HRESULT FindClosestCategory(
[in] REFGUID rguid,
[out] GUID *pcatid,
[in] const GUID **ppcatidList,
[in] ULONG ulCount
);
Parameters
[in] rguid
Specifies the address of the GUID for which to find the closest category.
[out] pcatid
Pointer to the GUID that receives the CATID for the closest category.
[in] ppcatidList
Pointer to a pointer that specifies an array of CATIDs to search for the closest category.
[in] ulCount
Specifies the number of elements in the array of the ppcatidList parameter.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method obtained the closest category from the list of categories, or the method was unable to obtain a category from the list and indicates this with a pcatid parameter pointer to GUID_NULL. |
|
The method was unable to find a category for the specified GUID and signals this with a pcatid parameter pointer to GUID_NULL. |
|
The method cannot access the internal table. |
|
The specified pcatid parameter was NULL on input, or the list of categories contained a NULL element when the ulCount parameter was nonzero. |
|
There is insufficient memory to perform the operation. |
Remarks
The closest category to a GUID is chosen in one of two modes. In the first mode, the method receives a non-empty category list. It chooses the first matching CATID from that list or GUID_NULL if the list does not contain a category that contains the GUID . In the second mode, it receives an empty category list. It chooses the first category that contains the GUID or GUID_NULL if no category contains the GUID .
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | msctf.h |
DLL | Msctf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |
See also
ITfCategoryMgr interface, ITfCategoryMgr::EnumCategoriesInItem, ITfCategoryMgr::EnumItemsInCategory, ITfCategoryMgr::RegisterCategory