How to create a ATL project with Automation?
Posted on 2006-07-02
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?