Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to create a ATL project with Automation?

Posted on 2006-07-02
3
Medium Priority
?
413 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
1 Comment
 
LVL 15

Accepted Solution

by:
lakshman_ce earned 2000 total points
ID: 17042387
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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Loops Section Overview

824 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