int main()
{
CoInitialize();
<interface name here> * pTest;
HRESULT hr = CoCreateInstance(CLSID_TestClass, NULL, CLSCTX_ALL, IID_<interface name here>, (void**)&pTest);
if (FAILED(hr))
{
//2Do: Handle error.
return <some error code>;
}
cout << pTest->info();
pTest->Release();
CoUninitialize();
}
I won't even try to explain the above because you are at least one good book away from trying to understand this. If you can understand enough of C++, you could try reading about COM in MSDN library.