Solved

How to create a ATL project with Automation?

Posted on 2006-07-02
3
374 Views
Last Modified: 2013-11-25
I want to create a ATL project, the detailed procedure is:

1. Click File|New...
2. When the AppWizard popup, click "Projects" tab, and select "ATL COM AppWizard", then input the project name as well as the location for the project files at the right side of the dialog.
3. In "ATL COM AppWizard - Step 1 of 1", select "Server Type" as "Dynamic Link Library(DLL)", and check "Support for MFC" option, then click the "Finish" button.
4. In the project workspace, click "Classes", and then add "New ATL object", in the dialogbox, select "Simple Object", and in the next dialogbox, input the simple name of the simple object and click "OK".

I want to perform the above procedures automatically by automation or other technologies, so that what I need is to call a function like this:

BOOL CreateATLProject(const CString& strProjectName, const CString& strProjectPath, const CString& strSimpleObjectName);

where strProjectName indicates the project name, strProjectPath indicates the location for the project, and strSimpleObjectName indicates the name of the simple object to be created.

When invoke such a function with the given parameters, a ATL project can be created automatically according to the above mentioned procedures, and return TRUE if the project is created successfully and FALSE if otherwise. How to implement such a CreateATLProject function?
0
Comment
Question by:chcw
3 Comments
 
LVL 15

Accepted Solution

by:
lakshman_ce earned 500 total points
Comment Utility
You can try to record a macro and run the macro using the /command switch

devenv /command "Macros.MyMacros.CreateATLProject"

For recording macros you can refer to this link
http://msdn2.microsoft.com/en-us/library/7kyhdt1z.aspx

I am not sure if you can totally automate what you desire with visual studio macros. You can view the created macro , look at the definitions in Visual Studio to achieve what you wouldn need.

Also I think it would be easier to do this with other automation tools like VisualTest which records what you do with user interface and creates functions for it.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now