CoInitialize(NULL);
CLSID clsId = GUID_NULL;
if (S_OK == CLSIDFromString(OLESTR("{C4E98946-B075-4C69-83BB-79C95FE5E00F}"), &clsId))
{
ICStringModule* pICString= NULL;
HRESULT hr = CoCreateInstance(clsId, NULL, CLSCTX_ALL, IID_ICStringModule, (void**)&pICString);
if (SUCCEEDED(hr)
&&(pICString != NULL))
{
... // 成功
}
else
{
pICString = NULL;
... // 失败
}
}
else
{
... // 失败
}
CoUninitialize();
初始化COM组件
最新推荐文章于 2022-12-31 10:21:18 发布