Click to open or copy the LABRADOR project files.
This sample shows how to use ATL to implement an EXE server without any user interface. The server allows creation of an object that supports two custom interfaces, defined in Labrador.idl.
Running the Sample
You need to build and set up three components: the server, the marshalling DLL, and the driver.
The Server
/RegServer
command-line option to set up the registry (for convenience, a custom build rule does this for you). The Marshalling DLL
NMAKE -f labps.mak
REGSVR32 labps.dll
The Driver
This sample uses the following keywords:
_CrtDumpMemoryLeaks; _tcsicmp; _tcstok; _tprintf; _vstprintf; ATLASSERT; BEGIN_COM_MAP; BEGIN_OBJECT_MAP; CComModule::Init; CComModule::RegisterClassObjects; CComModule::RevokeClassObjects; CComModule::Unlock; CComModule::UnregisterServer; CComObjectRoot; CoCreateInstance; COM_INTERFACE_ENTRY; CoUninitialize; DECLARE_NOT_AGGREGATABLE; DECLARE_REGISTRY; DispatchMessage; END_OBJECT_MAP; GetCurrentThreadId; GetMessage; OBJECT_ENTRY; OutputDebugString; PostThreadMessage; Trace; va_end; va_list; va_start; wcscpy