COMOBJ - COM Objects in a DLL SUMMARY ======= The COMOBJ DLL offers several car-related COM object classes. Because COMOBJ.DLL supports no object handlers, class factories, full in-process servers, or marshshaling, it is not a full-blown COM Server. Rather, it is a primitive precursor to an COM in-process server. This DLL exposes the following COM objects: COCar, COUtilityCar, and COCruiseCar. Appropriate create functions are exported from this DLL: CreateCar, CreateUtilityCar, and CreateCruiseCar. In this tutorial, COMOBJ works with the COMUSER code sample to show how an EXE client (COMUSER.EXE) calls COM object creation services and manipulates the COM objects that are created. For functional descriptions and a tutorial code tour of COMOBJ, see the Code Tour section in COMOBJ.HTM. For details on setting up the programmatic usage of COMOBJ, see the Usage section in COMOBJ.HTM. To read COMOBJ.HTM, run TUTORIAL.EXE in the main tutorial directory and click the COMOBJ lesson in the table of lessons. You can also achieve the same thing by clicking the COMOBJ.HTM file after locating the main tutorial directory in the Windows Explorer. See also COMUSER.HTM in the main tutorial directory for more details on the COMUSER client application and how it works with COMOBJ.DLL itself. 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. The .H goes to \INC, the .LIB goes to \LIB, and the .DLL goes to \COMUSER. In general, to set up your system to build and test the code samples in this ActiveX Tutorial series, see TUTORIAL.HTM for details. The supplied makefile is Microsoft NMAKE-compatible. To create a debug build, issue the NMAKE command at the command prompt. Usage ----- COMOBJ is a DLL that you can access from .EXE modules either by performing an explicit LoadLibrary call or implicitly loading the DLL by linking to its associated import library (.LIB) file. In either case, you need to include COMOBJ.H to declare the functions that are defined as exported in the COMOBJ DLL. In this lesson, a representative COMUSER.EXE application is provided to illustrate the programmatic use of COMOBJ.DLL. COMUSER is built in the COMUSER lesson (in sibling directory COMUSER). See below for more details. FILES ===== Files Description COMOBJ.TXT This file. MAKEFILE The generic makefile for building the COMOBJ.DLL code sample. COMOBJ.H The include file for declaring as imported or defining as exported the service functions in COMOBJ.DLL. COMOBJ.CPP The main implementation file for COMOBJ.DLL. Has DllMain and the COM Object creation functions. CAR.H The include file for the COCar COM object class. CAR.CPP The implementation file for the COCar COM object class. UTILCAR.H The include file for the COUtilityCar COM object class. UTILCAR.CPP The implementation file for the COUtilityCar COM object class. CRUCAR.H The include file for the COCruiseCar COM object class. CRUCAR.CPP The implementation file for the COCruiseCar COM object class. COMOBJI.H The include file for the internal class declarations and resource identifier definitions for resources stored inside the COMOBJ.DLL. COMOBJ.RC The DLL resource definition file. COMOBJ.ICO The icon resource.