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.
See also