Aptserve: Apartment Model Local Server

Click to open or copy the Aptserve 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 Register and Marshal samples.

The apartment model is a way of COM programming that associates a single thread of execution with a family of COM objects so that an object in the family will be executed only on the thread of its apartment. When this arrangement is constructed in a server, COM plays a role in enforcing the single-thread rule for objects in the apartment by ensuring that client calls on any thread to objects in a server apartment will be executed only on the thread of the apartment.

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:

_beginthreadex; addref; adjust; apt_init_data; aptthreadproc; cfcar; cfcruisecar; cfutilitycar; cimpicar; cimpiclassfactory; cimpicruise; cimpiutility; clear; closefactories; closehandle; clutch; cmainwindow; cocar; cocreateinstance; cocruisecar; coinitialize; copy; coregisterclassobject; corevokeclassobject; couninitialize; coutilitycar; create; createinstance; createserverlog; cserver; defined; defwindowproc; delete_pointer; dispatchmessage; domenu; engage; errorbox; failed; findwindow; getlasterror; getmenu; getmessage; getmodulefilename; getsystemmetrics; getusername; initapplication; initinstance; iswindow; loadcursor; loadicon; loadimage; loadstringa; lock; lockserver; logerror; logf1; logf2; logid; logtoserver; lstrcat; lstrcmpia; lstrcpy; lstrlen; makeintresource; messageboxa; objectsdown; objectsup; offroad; openfactories; ownthis; postmessage; postquitmessage; postthreadmessage; queryinterface; rclsid; regclosekey; regcreatekeyex; regdeletekey; registerclassex; registerserver; regsetvalueex; release; release_interface; releasemutex; setclient; setregkeyvalue; shift; showdialog; showwindow; speed; startthread; stdmethodimp_; steer; stringfromguid2; style; succeeded; text; translatemessage; unicodeok; unlock; unownthis; unregisterserver; updatewindow; waitformultipleobjects; waitforsingleobject; winch; windowproc; winmain; wsprintf