Solved

How to create a ATL project with Automation?

Posted on 2006-07-02
3
393 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

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