Data Model > Extending the UNICOM Intelligence Data Model > Creating a Metadata Source Component (MDSC) > Creating an MDSC in Visual C++ > Setting up the project to implement the MDSC interface
 
Setting up the project to implement the MDSC interface
You now need to amend the project's .idl file so that it implements the MDSC Interface.
1 In the File view in Visual C++, double-click the project's .idl file.
2 Add the line import "MDSC.idl"; at the top of the file:
import "oaidl.idl";
import "ocidl.idl";
import "MDSC.idl";
3 Add the line interface IMetadataLoad; to the definition of the coclass:
coclass myMetadata
{
  [default] interface IMyMetadata;
  interface IMetadataLoad;
};
4 Compile the project .idl file.
Visual C++ now generates the type library for the project and includes the IMetadataLoad interface.
5 In the Class view in Visual C++, select the new class and right-click. From the shortcut menu, choose Implement Interface.
6 Select IMetadataLoad and then click OK.
When Visual C++ has finished generating the additional code, the project will be ready for you to add the code that is required to populate the MDM Document with your proprietary metadata.
Note For information about registering your MDSC, see Adding registration support to a DSC.
See also
MDSC interface
Populating the MDM Document
Visual C++ examples
Adding registration support to a DSC
Creating a Metadata Source Component (MDSC)
Creating an MDSC in Visual Basic
Creating an MDSC in Visual C++