一、在需要的文件中引入com对应的dll文件
#import "xuhh_math.dll" no_namespace, named_guids, auto_search
在调用的地方
HRESULT hr = ::CoInitialize(NULL);
if ( hr == S_OK )
{
CComPtr<IXuhh_Math> math;
hr = math.CoCreateInstance(CLSID_Xuhh_Math);
if ( hr == S_OK )
{
math.dosomething();
}
}
math.Release();//释放资源
math=NULL;
CoUninitialize();