When decompiling COM interop assemblies it is important to preserve method / properties order.
DotPeek does not seem to do this.
Consider the following example:
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)