You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently the COM-compatible ABI for overloaded methods is to group overloads together but put them in reverse order. I observed this in my use of DirectComposition APIs, but it seems to be pretty poorly documented. The best I could find is gcc bug 53398.
Also note the previous link suggests a naming scheme of MethodNameMethodName_2MethodName_3. I personally prefer this over the current scheme of MN1MN2, especially for methods that end in a digit, for example IDCompositionArithmeticCompositeEffect::SetCoefficient1. Also note that the 1-based numbering is not consistently applied, for example the overloaded methods in dwrite_3.rs use a MNMN1MN2 convention.
I'll prepare a patch that applies the MNMN_2MN_3 convention because I think it's best, but am open to other alternatives. It seems unlikely that we'll be breaking many existing users.
The text was updated successfully, but these errors were encountered:
raphlinus
added a commit
to raphlinus/winapi-rs
that referenced
this issue
Nov 18, 2017
Puts overloaded COM methods in reverse order to follow MSVC ABI
convention. Also changes the naming convention to use an underscore
and a 1-based number for all overrides but the first, from the
current convention which is not consistent.
Tested with animations using the DirectComposition interfaces, which
are most of the changes. The main other cluster is font management
in DirectWrite.
Fixesretep998#523.
Apparently the COM-compatible ABI for overloaded methods is to group overloads together but put them in reverse order. I observed this in my use of DirectComposition APIs, but it seems to be pretty poorly documented. The best I could find is gcc bug 53398.
Note that Microsoft has published guidance discouraging overloads in COM-visible interfaces but seems to be ignoring this more recently. I believe this renders C bindings inoperable, but that's a separate question.
Also note the previous link suggests a naming scheme of
MethodName
MethodName_2
MethodName_3
. I personally prefer this over the current scheme ofMN1
MN2
, especially for methods that end in a digit, for exampleIDCompositionArithmeticCompositeEffect::SetCoefficient1
. Also note that the 1-based numbering is not consistently applied, for example the overloaded methods in dwrite_3.rs use aMN
MN1
MN2
convention.I'll prepare a patch that applies the
MN
MN_2
MN_3
convention because I think it's best, but am open to other alternatives. It seems unlikely that we'll be breaking many existing users.The text was updated successfully, but these errors were encountered: