home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / atl / connect / connect.txt < prev    next >
Text File  |  1998-03-26  |  1KB  |  39 lines

  1.  
  2. CONNECT
  3.  
  4. This sample illustrates the use and implementation of connection
  5. points (the ICOnnectionPointContainer and IConnectionPoint interfaces)
  6. in a multithreaded environment.
  7.  
  8. The server is implemented in the CONNECT.DLL. This DLL allows the
  9. creation of a CoRandom COM object, implemented by the CRandom C++
  10. class. The COM object supports IRandom (a dual interface) and
  11. IConnectionPointContainer, and it accepts connections for the
  12. IRandomEvent interface.
  13.  
  14. The IRandom interface supports the following methods:
  15.     Start(): starts a thread inside the object
  16.     Stop(): stops a thread inside the object
  17.     StopAll(): stops all the running threads
  18.  
  19. When running, the secondary threads inside the object keep firing
  20. events through the connection point.
  21.  
  22. Two clients are provided: DRIVE and MDRIVE. They can be found in
  23. the DRIVE and MDRIVE subdirectories.
  24.  
  25. DRIVE.EXE is a simple console application that provides a single
  26. object implementing the IRandomEvent interface. It creates a
  27. CoRandom object, calls Advise()/Unadvise() on the connection
  28. point, and has the CoRandom object fire events into the drive's object.
  29.  
  30. MDRIVE.EXE is an MFC dialog based application, able to create
  31. multiple advise sinks and to control the number of threads the
  32. server creates.
  33.  
  34. HOW TO RUN IT:
  35.  
  36. Build CONNECT.DLL and register it. You can build and run DRIVE.EXE
  37. from a console, or build and run MDRIVE.EXE directly from
  38. Developer Studio.
  39.