On 2016-08-08 18:42, Henri Verbeet wrote:
I think the tendency has been to generate COM headers from IDL, even for things that aren't necessarily generated from IDL in the PSDK. E.g. it has been suggested to generate the d3d8 and d3d9 headers from IDL as well at some point.
I ran into two potential problems when migrating this to a .idl file:
The first one is an #include cycle between d3d10.h and d3d10misc.h. I didn't change the cpp_quote("#include "d3d10misc.h"") line in d3d10.idl to an import statement. I don't know what the correct approach here is.
The second concern is that the widl-generated d3d10misc.h directly includes rpc.h, rpcndr.h, windows.h and ole2.h, while the manually written one does not. I believe this is a non-issue because the first thing the old d3d10misc.h did was include d3d10.h, which includes the 4 mentioned files even before the __d3d10_h__ include guard.