DCDServe: DCOM Server Using Security

Note   To use this sample, you must first build (or otherwise register) the DCDMarsh sample on the client and server, and you must first build the Register sample.

The DCOMDraw, DCDServe, and DCDMarsh samples together form a distributed drawing application. Using Distributed COM (DCOM) technology, they allow users on different client machines in a network to interactively draw on a shared drawing. All DCOMDraw clients see the same drawing and any client can take ownership of the pen to draw. The user of DCOMDraw can use a mouse or tablet device to draw in the client window and can choose the color and width of the electronic ink. As clients draw, the application echoes the drawing activity from DCDServe to all connected clients using DCOM over the network. Although these samples do not build an optimized and complete application, the functionality is suggestive of the shared whiteboards offered by some workgroup applications.

In addition to providing a standard way to construct applications from reusable software components, COM technology fosters a strong architectural separation between client and server. This separation has been the repeated pattern in other samples of this series. For example, the Stoserve server houses a COPaper COM object that is used by the Stoclien client. Although they are a client/server pair, the Stoclien and Stoserve samples use an in-process server for the COPaper COM object. With the DCOMDraw and DCServe client/server samples, the architectural separation between client and server is retained but the COPaper COM object is housed in an out-of-process server, DCDServe. COPaper implements a custom ISharePaper interface to permit multiple clients to use the COPaper object simultaneously. The application also requires a DCDMarsh server to provide standard marshaling for the custom interfaces used across process and machine boundaries.

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; addregnamedvalue; advise; cfpaper; cimpiclassfactory; cimpiconnectionpointcontainer; cimpisharepaper; client; clone; closefactories; cmainwindow; coconnectionpoint; coenumconnectionpoints; coenumconnections; coinitialize; coinitializesecurity; copaper; coregisterclassobject; corevokeclassobject; couninitialize; create; createinstance; createstream; cserver; dcomok; defined; defwindowproc; delete_pointer; dispatchmessage; domenu; enumconnectionpoints; enumconnections; erase; erased; errorbox; failed; findconnectionpoint; findslot; getconnectioninterface; getconnectionpointcontainer; getexename; getink; getlasterror; getmenu; getmessage; getmodulefilename; getslot; getsystemmetrics; getusername; initapplication; initinstance; initpaper; inkdraw; inkstart; inkstop; iswindow; load; loadcursor; loaded; loadicon; loadimage; loadstringa; lock; locked; lockserver; lstrcat; lstrcmpia; lstrcpy; lstrlen; makefamilypath; makeintresource; makelong; memcpy; memset; messageboxa; next; nextslot; notifysinks; objectfirst; objectqi; objectsdown; objectset; objectsup; openfactories; openstream; ownthis; postmessage; postquitmessage; queryinterface; regclosekey; regcreatekeyex; regdeletekey; registerclassex; registerclipboardformat; registerserver; regopenkeyex; regsetvalueex; release; release_interface; reset; resize; resized; rgb; save; saved; setregkeyvalue; showdialog; skip; stdmethodimp_; stgcreatedocfile; stgisstoragefile; stgopenstorage; stringfromguid2; style; succeeded; text; translatemessage; unadvise; unicodeok; unlock; unlocked; unownthis; unregisterserver; windowproc; winmain; writeclassstg; writefmtusertypestg; wsprintf