Coclass MyCom

{

[default] interface IMyCom;

};

};

 

 

This file can be used as a prototype for further interface definitions. Notice it contains 3 GUIDs, one each for the Interface, the coclass, and the type library. These MUST be changed and distinct for new applications.

 

This definition file should look pretty well self-explanatory, except for the interface itself:

 

[propget, helpstring("property Value")] HRESULT Value([out, retval] long *pVal); [propput, helpstring("property Value")] HRESULT Value([in] long newVal); [helpstring("method Raise")] HRESULT Raise(long Value);

 

Here are the same interfaces defined in MASM: