- // jclient.cpp
- #import "c:Inside COM+ Base ServicesLanguage IntegrationJavaSumJavaSum.dll" no_namespace
- #import "c:Inside COM+ Base ServicesLanguage Integrationcomponentdebugcomponent.dll" no_namespace
- #include <iostream.h>
- void main()
- {
- CoInitialize(NULL);
- ISumPtr myRef(__uuidof(SumClass));
- int result = myRef->Sum(5, 13);
- cout << "5 + 13 = " << result << endl;
- myRef = NULL;
- CoUninitialize();
- }