如何定义CATID以及要包含哪个头文件以定义CATID?

问题描述:

如何定义CATID以及要包含哪个头文件以定义CATID?



How to define a CATID and also which header file to include in order to define a CATID?

HRESULT RegisterClassReqCategory(const CLSID* rclsid, CATID rgcatid,
BOOL bRegister = TRUE);



我得到了如果我定义CATID,则会出现以下错误




I am getting the below error if I define a CATID

error C2061: syntax error : identifier 'CATID'





请提供一些建议。



Kindly provide some suggestions.

在MSDN页面上查看函数RegisterClassReqCategory [ ^ ]。页面底部是要求表,其中说明了应包含的头文件。在你的情况下,它是 ComCat.h 。打开该文件时,您将找到定义。
Take a look on the MSDN page for the function RegisterClassReqCategory[^]. At the bottom of the page is the Requirements table which states the header files that should be included. In your case it is ComCat.h. When opening that file, you will find the definition.