Share via


COMIDE: Demonstrates an Automation Client Application with Compiler COM Support

COMIDE is a stand-alone Automation (formerly OLE Automation) client. It automates Microsoft Visual C++. This sample generates copies of itself to be built and run by Visual C++ for the number of times specified by the nLives variable. By default, the sample runs comide1 twice and comide2 twice.

For more information, see the article "Automating Tasks in Visual C++".

There is a Visual Basic project that controls the server in a way analogous to the COM code in Visual C++. You can compare the Visual Basic code with the code of this sample to see the similarities. You can use Visual Basic-specific object model documentation to write COM controllers in Visual C++. In fact, this is how this sample was written.

To run this sample:

Run samples\com\comide\comide1\comide1.exe
which edits samples\com\comide\comide2\comide2.cpp and runs it
which edits samples\com\comide\comide1\comide1.cpp and runs it
which edits samples\com\comide\comide2\comide2.cpp and runs it
and so on.

This sample demonstrates the following keywords:

dispinterface; #import; _com_ptr_t; _variant_t; _bstr_t; _com_error.

See also .