- // easyclient.cpp
- #define _WIN32_DCOM
- #import "componentdebugcomponent.dll" no_namespace
- #include <iostream.h>
- void main()
- {
- CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
- ISumPtr myRef(__uuidof(InsideCOM));
- int result = myRef->Sum(5, 13);
- cout << "5 + 13 = " << result << endl;
- myRef = NULL;
- CoUninitialize();
- }