// main.cpp - Copyright (C) 2000 Pat Thoyts // // C++ client for the ZTest COM test server. // // @(#)$Id: main.cpp,v 1.1.1.1 2000/11/20 02:10:46 pat Exp $ #define INITGUID #include #include #include #include "../server/IZTest.h" using namespace std; int main(int argc, char** argv) { HRESULT hr = CoInitialize(0); if (SUCCEEDED(hr)) { IZTest* pZTest; hr = ::CoCreateInstance(CLSID_ZTest, 0, CLSCTX_ALL, IID_IZTest, reinterpret_cast(&pZTest)); if (SUCCEEDED(hr)) { hr = pZTest->Message("Hello There"); pZTest->Release(); pZTest = 0; } else { cerr << "Failed to create an instance of ZTest" << endl; } CoUninitialize(); } else { cerr << "Failed to initialize the COM library\n" << endl; } return 0; } // // Local variables: // mode: c++ // c-file-style: "stroustrup" // indent-tabs-mode: nil // End: