home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / msj / v10n12 / oleq1295.exe / CLIENT1.CPP next >
C/C++ Source or Header  |  1995-12-01  |  387b  |  19 lines

  1. /////////////////////////////////////////////////////////
  2. //
  3. // Client1.cpp - client code to access IFoo
  4. //
  5.  
  6. #include <windows.h>
  7. #include "IFoo.h"
  8.  
  9. void UseFoo(IUnknown *punk)
  10. {
  11.   IFoo *pfoo = 0;
  12.   if (SUCCEEDED(punk->QueryInterface(IID_IFoo, (void**)&pfoo))) {
  13.     short s = 0;
  14.     if (pfoo->Agreement(&s) == S_OK)
  15.       pfoo->Argument(s);
  16.     pfoo->Release();
  17.   }
  18. }
  19.