Aptclien: Client of Apt-Threaded, Out-of-Process Local Server

Click to open or copy the Aptclien 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 Aptserve sample.

The Aptclien sample shows a client of the Aptserve apartment-threaded server. Aptclien is a client of the multiple component apartments in Aptserve. Its main purpose is to exercise and reveal for study the multiple apartments in the Aptserve local out-of-process server. The Remclien sample, run in conjunction with Aptclien, shows the effects of multiple clients on the Aptserve multithreaded server, with one client controlling from a remote machine.

Aptclien manipulates objects that represent various automobiles and are from other samples in this tutorial series (see samples\sdk\com\tutsamp\tutorial.txt), with the following interfaces: ICar, IUtility, and ICruise. Aptclien works in conjunction with the separate Aptserve.exe, which provides the COCar, COUtilityCar, and COCruiseCar COM objects.

Aptclien.exe creates its own COUtilityCruiseCar COM object by reusing the COCruiseCar COM object by containment and augmenting it with a native implementation of the IUtility interface. Like Locclien, Aptclien's COUtilityCruiseCar composite object reuses COCruiseCar by containment. However, because COCruiseCar and COCar are in different apartments, COCruiseCar reuses COCar by containment.

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; cimpicar; cimpicruise; cimpiutility; clear; clutch; cmainwindow; cocreateinstance; cofreeunusedlibraries; cogetclassobject; coinitialize; copy; couninitialize; coutilitycruisecar; create; createinstance; createutilitycruisecar; defined; defwindowproc; delete_pointer; dispatchmessage; domenu; engage; errorbox; failed; findwindow; 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; msg; offroad; outputdebugstring; 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