需要添加如下代码:
CFactoryTemplate g_Templates[] = {
{ L"My ActiveX"
, &CLSID_SystemClock
, CSystemClock::CreateInstance
}
};
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
CFactoryTemplate g_Templates[] = {
{ L"My ActiveX"
, &CLSID_SystemClock
, CSystemClock::CreateInstance
}
};
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
本文介绍了一段用于注册COM组件的C++代码示例。通过定义`CFactoryTemplateg_Templates`数组并设置相应的CLSID和创建实例函数,实现了特定COM组件(如“MyActiveX”)的注册过程。
236

被折叠的 条评论
为什么被折叠?



