Solved

How to create a ATL project with Automation?

Posted on 2006-07-02
3
391 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Accepted Solution

by:
lakshman_ce earned 500 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…

734 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