Click to open or copy the Simple project files.
The Simple sample demonstrates the minimum requirements to use a COM object, whether it is on the same machine or on a different machine. This sample consists of a client and a server portion.
Note DCOM is implemented only on Windows NT 4.0 and later versions. This sample will not work correctly on Windows 95 or on earlier versions of Windows NT.
The server application, Sserver.exe, implements the CLSID_SimpleObject class as a LocalServer. Instances of the class support a limited form of the IStream interface. Calls to Read and Write succeed, but they do nothing. Calls to other methods fail with E_NOTIMPL.
The client application, Sclient.exe, uses the CLSID_SimpleObject class implemented by the server.
This sample uses the following keywords:
addref; atol; clone; closehandle; cocreateinstanceex; coinitializeex; commit; copyto; coregisterclassobject; cotaskmemalloc; couninitialize; createevent; createinstance; csimpleobject; define_guid; exit; failed; formatmessage; getlasterror; hresult_code; hresult_facility; hresult_from_win32; interlockeddecrement; interlockedincrement; localfree; lockregion; makelangid; memset; message; multibytetowidechar; outputtime; queryinterface; queryperformancecounter; queryperformancefrequency; release; revert; seek; setevent; setsize; stat; stdmethodimp_; text; unlockregion; waitforsingleobject; wprintf