COMuser: User of COM Objects in COMobj.DLL

Click to open or copy the COMuser project files.

Click to open or copy the Include files (required).

Click to open or copy the Library files (required).

Note   To use this sample, you must first build the COMobj sample.

The COMuser sample presents a series of COM objects, several of which are introduced in the COMobj 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.

See the parent topic, COM Tutorial Samples, to download global tutorial files or any HTML files about this sample.

Building SDK Samples

This sample uses the following keywords:

addref; adjust; checkmenuitem; cimpiutility; clear; clutch; cmainwindow; coinitialize; comobjaboutbox; comobjinitmsglog; copy; couninitialize; coutilitycruisecar; create; createcar; createcruisecar; createutilitycar; createutilitycruisecar; defined; defwindowproc; delete_pointer; dispatchmessage; domenu; engage; errorbox; failed; getdc; gethwnd; getinterface; getlasterror; getmenu; getmenustate; getmessage; getsystemmetrics; gettextmetrics; getusername; initapplication; initinstance; loadaccelerators; loadcursor; loadicon; loadimage; loadstringa; log; logerror; logf1; logging; logid; makefamilypath; makeintresource; messageboxa; offroad; postmessage; postquitmessage; queryinterface; readhelp; readsource; readtutorial; registerclassex; release; release_interface; releasedc; resize; shift; showdialog; showwindow; speed; stdmethodimp_; steer; style; succeeded; text; translateaccelerator; translatemessage; unicodeok; updatewindow; winch; windowproc; winmain