Microsoft KB Archive/256117

= ATLComp.exe: Add Many ATL Simple Objects from ATL Object Wizard =

Article ID: 256117

Article Last Modified on 8/11/2004

-

APPLIES TO


 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition
 * Microsoft ActiveX Template Library 3.0
 * Microsoft ActiveX Template Library 2.0

-



This article was previously published under Q256117



SUMMARY
The ATLComp.exe add-in sample enables you to insert many ATL-based COM classes from the ATL Object wizard. This sample in particular inserts the "Simple Object" from the ATL Object Wizard. Moreover, the ATLComp.exe add-in is based on the Developer Studio Object Model and Microsoft Foundation Classes (MFC). This sample is unsupported.



MORE INFORMATION
The following files are available for download from the Microsoft Download Center:

ATLComp.exe

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

The self extracting ATLComp.exe file contains the following files:

Steps to Install the Add-In

 * 1) Run ATLComp.exe to extract the Visual C++ project.
 * 2) Build the project in Visual C++ in Release or Debug configuration.
 * 3) In Visual C++, click Customize from the Tools menu.
 * 4) In the Customize dialog box, click Add-Ins and Macro Files.
 * 5) Click Browse and locate the InsertManyATLComp.dll file that was built in step 2.
 * 6) Click OK to save the settings. A toolbar with the InsertManyATLComp command appears.

Using the ATLComp.exe Add-In
Click InsertManyATLComp to launch the "Insert Many ATL Object Wizard Components" dialog. In this dialog you can either choose to create a series of ATL classes or specify a custom list of classes to create. You can select one of them by choosing the appropriate radio button.

If you choose the first radio button then you should specify the short name for the "Simple Object", the start and end values. For example if you enter "MyObject" as the short name, 1 and 10 for the start and end values respectively, then clicking OK adds classes CMyObject1 through CMyObject10 to your project.

When the add-in is performing the task of adding classes you should avoid using the keyboard and avoid switching to another program. Also, do not add duplicate ATL classes.

If you find that the add-in fails to add a class or you get a build error then open the InsertATLClass.cpp file; go to line 173; change the delay amount passed to the Sleep function; rebuild the project and try adding the classes again. Sometimes problems arise due to synchronization. The default value passed to Sleep is 2000 milliseconds.

