ComImport interface signatures are broken due to methods/properties reordering

When decompiling COM interop assemblies it is important to preserve method / properties order.
DotPeek does not seem to do this.

Consider the following example:

IX509PrivateKey interface
https://msdn.microsoft.com/en-us/library/windows/desktop/aa378921(v=vs.85).aspx

Compare original definition from certenroll.h with what DotPeek produces when decompiling an interop library created from CertEnroll type-library. Notice that methods order is different in the .cs source code.

COM interface methods must never be reordered.

(see files IX509PrivateKey.certenroll.h IX509PrivateKey.cs uploaded to https://uploads.services.jetbrains.com)

0
1 comment
Official comment

Hello,

I'm happy to say that this issue is fixed in dotPeek 2017.2. You may download it here: https://www.jetbrains.com/decompiler/download/

Thank you.

Please sign in to leave a comment.