The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

LABRADOR Sample: Implements a Server with an Out-of-Proc Custom Interface and Compiler COM Support 

Download sample

This sample shows how to use ATL to implement an EXE server. The server allows creation of an object that supports two custom interfaces, defined in Labrador.idl. Compiler COM support is used to implement custom interfaces that perform nontrivial marshaling of a C-style array.

Compare this sample with the LABRADOR sample in the ATL directory.

Security noteSecurity Note

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

Building and Running the Sample


If you are running Visual C++ Express Edition, you might need to install the Platform SDK before running this sample. For information on how to do this, see How to: Use Visual C++ Express Edition with the Microsoft Platform SDK.

To build and run this sample

  1. Open the solution labrador.sln.

  2. On the Build menu, click Build Solution. Note that a compiler warning will occur because this sample uses the obsolete ATL class CComModule. Refer to the ATL version of this sample to see how to use CAtlExeModule.

  3. Set labdriv as the startup project (right-click the project node and click Set as StartUp Project).

  4. On the Debug menu, click Start Without Debugging.


This sample demonstrates the following keywords:

#import; _com_ptr_t; _com_error

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft