ATL sample files
The following pages show how to create a simple XMLSpy IDE plug-in DLL using ATL. To build the DLL it is necessary to know about ATL, the wizards that generate new ATL objects, as well as MS VisualStudio.
To access the API the implementation imports the Type Library of XMLSpy. The code reads various properties and calls methods using the smart pointers provided by the #import statement.
In addition, the sample code uses the MFC class CString and the ATL conversion macros such as W2T.
At a glance the steps to create an ATL DLL are as follows:
1. | Open VisualStudio and select "New..." from the "File" menu. |
2. | Select the "styleclass="Code Bold"" tab. |
3. | Select "ATL COM AppWizard" and type in a project name. |
4. | Select "Support for MFC" if you want to use MFC classes, or if you want to create a project for the sample code. |
Having created the project files you can add an ATL object to implement the IXMLSpyPlugIn interface:
1. | Select "New ATL Object..." from the "Insert" menu. |
2. | Select "Simple Object" from the wizard and click "Next". |
3. | Type in a name for the object. |
4. | On the "Attributes" tab, select "Custom" for the type of interface, and disable Aggregation. |
These steps produce the skeleton code for the implementation of the IDE plug-in interface. Please see the following pages on how to modify the code and achieve some basic functionality.