home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Windows Gam…ming Gurus (2nd Edition)
/
Disc2.iso
/
msdn_vcb
/
samples
/
vc98
/
sdk
/
com
/
tutsamp
/
comuser
/
comuser.txt
< prev
next >
Wrap
Text File
|
1997-08-05
|
3KB
|
68 lines
COMUSER - User of COM Objects in COMOBJ.DLL
SUMMARY
=======
The COMUSER sample presents a series of COM objects, several of which were
introduced in the COMOBJ code sample. These objects represent various
types of cars, and they expose the following interfaces: ICar, IUtility,
and ICruise. COMUSER works in conjunction with the separate COMOBJ.DLL,
which creates COCar, COUtilityCar, and COCruiseCar COM objects.
COMUSER.EXE creates its own COUtilityCruiseCar COM object, which is
constructed by reusing the COCruiseCar COM object by aggregation and
augmenting it with the IUtility interface. Because the COCruiseCar COM
object class is also an aggregate--that is, it reuses an inner COCar
object by aggregation--COMUSER illustrates nested aggregation of COM
objects.
For functional descriptions and a tutorial code tour of COMUSER, see the
Code Tour section in COMUSER.HTM. For details on the external user
operation of COMUSER, see both the Usage and Operation sections in
COMUSER.HTM. To read COMUSER.HTM, run TUTORIAL.EXE in the main tutorial
directory and click the COMUSER lesson in the table of lessons. You can
also achieve the same thing by clicking the COMUSER.HTM file after
locating the main tutorial directory in the Windows Explorer. See also
COMOBJ.HTM in the main tutorial directory for more details on how COMOBJ
works and exposes its services to COMUSER. You must build COMOBJ.DLL
before building COMUSER. The makefile for COMOBJ copies the necessary
COMOBJ.H, COMOBJ.LIB, and COMOBJ.DLL files to the appropriate sibling
directories once the files are built.
In general, to set up your system to build and test the code samples in
this COM Tutorial series, see the global TUTORIAL.HTM file for details.
The supplied makefile is Microsoft NMAKE-compatible. To create a debug
build, issue the NMAKE command in the Command Prompt window.
Usage
-----
COMUSER is a simple application that you can execute directly from Windows
in the normal manner or from the command prompt. No command line parameters
are recognized by COMUSER.
FILES
=====
Files Description
COMUSER.TXT This file.
MAKEFILE The generic makefile for building the code sample
application of this tutorial lesson.
COMUSER.H The include file for the COMUSER application. Contains
class declarations, function prototypes, and resource
identifiers.
COMUSER.CPP The main implementation file for COMUSER.EXE. Has WinMain
and CMainWindow implementation. Also has the main menu
dispatching.
COMUSER.RC The application resource definition file.
COMUSER.ICO The application icon resource.
UTCRUCAR.H The class declaration for the COUtilityCruiseCar COM object.
UTCRUCAR.CPP Implementation file for the COUtilityCruiseCar COM object.
Also has the definition of the CreateUtilityCruiseCar
function.