I am new to MIDL and Windows. I am working on a project that is based on Windows, and as part of the project, there are a bunch of .idl
files delineating the interface modules.
I wanted to make some changes to a particular Interface class included in one .idl file, as part of testing some code changes that I have done. In doing so, I just copied the existing definition for an Interface method, and customized it:
[propput] HRESULT GetMethod([in] <type> <parameter>);
[propget] HRESULT PutMethod([out, retval] <type>* <parameter>);
This resulted in the resultant .tlh
file for the interface module including my change; but the change broke the code compilation because certain other modules that instantiated this interface module as part of a template instantiation, wouldn’t compile as the compiler reports my changes as pure virtual methods with no corresponding implementation.
I am at a loss to figure out, also due to my inexperience in working with MIDL and .idl
files, why only for my updates no implementation has been generated by the MIDL compiler. I can assure you that there was already an existing #import
statement for the interface module under consideration, for all the modules making use of the changed interface module. I wanted to highlight this as I read in another related post that not having the #import
statement could result in the MIDL compiler not generating the interface method definition.
I would really appreciate if anyone could point me in the direction of fixing this issue.
TIA
Vinod