IUnknown* pUnk=NULL;
// Always must be called before
// using COM functions
CoInitialize(NULL);
HRESULT hResult = CoCreateInstance(CLSID_IAmDumb,NULL,
CLSCTX_LOCAL_SERVER,IID_IAmDumb,(void**)&pUnk);
if (FAILED(hResult)) {
AfxMessageBox(_com_error(hResult).ErrorMessage(),MB_ICONSTOP);
}
CoUninitialize(); // Call so Windows can clean up