Developer Documentation Library > Data Model > Extending the UNICOM Intelligence Data Model > Creating a Metadata Source Component (MDSC) > Creating an MDSC in Visual C++ > Adding MDSC.idl and DMProperties.idl to the project
 
Adding MDSC.idl and DMProperties.idl to the project
IMetadataLoad is defined in MDSC.idl, which is supplied with the UNICOM Intelligence Developer Documentation Library. By default, the file is installed into [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Code\DSCs\VC6\MDSC.
You also need to add DMProperties.idl to the project, because it is used by MDSC.idl. DMProperties.idl is installed with the Visual C++ sample CDSC project, which by default is installed into [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Code\DSCs\VC6\mrXmlDsc. You can optionally copy these two files into the project folder.
1 From the Visual C++ menus, choose Project > Add to Project > Files...
2 Browse to the appropriate location, select MDSC.idl, and click OK.
3 Browse to the appropriate location, select DMProperties.idl, and click OK.
4 In the Visual C++ Workspace pane, select the File View tab.
You can now see MDSC.idl and DMProperties.idl in the list of Source Files.
5 Select MDSC.idl from the list of Source Files.
6 From the Project menu, choose Settings.
The Project Settings dialog opens.
7 In the Settings For list, select All Configurations.
8 On the General tab, select Always use custom build step, and then click the Custom Build tab.
9 In the Description text box, enter:
Compiling $(InputPath)
10 In the Commands text box, enter:
midl "$(InputPath)" /h "$(ProjDir)\$(InputName).h" /iid "$(ProjDir)\$(InputName)_i.c" /Oicf
11 In the Outputs text box, enter:
$(ProjDir)\$(InputName).h
$(ProjDir)\$(InputName)_i.c
This defines MDSC.h and MDSC_i.c as dependent on MDSC.idl and instructs Visual C++ to build them whenever they are required.
12 Click OK.
See also
Creating an MDSC in Visual C++