We have an idl file with multiple interfaces defined, two of which have somehting like this:
[
object,
uuid(79E24BAA-DC12-4caf-91DD-2A4D47FED30A),
helpstring("ISomeInterface Interface"),
pointer_default(unique)
]
interface ISomeInterface: IUnknown
{
[propget, id(2)] HRESULT SOMEMethod([out, retval] BSTR* pValue);
};
[
object,
uuid(834421B6-511D-457D-B50C-69E7E1B65471),
dual,
nonextensible,
helpstring("IACompleteDifferentInterface Interface"),
pointer_default(unique)
]
interface IACompleteDifferentInterface : IDispatch
{
[propget, helpstring("property SomeMethod")] HRESULT SomeMethod([out, retval] BSTR* pVal);
[propput, helpstring("property SomeMethod")] HRESULT SomeMethod([in] BSTR newVal);
}
They are two completely unrelated interfaces, that happen to have one method with the same name (although with different casing as shown). Everything seems ok, however when we try to compile a project that calls
ISomeInterface -> SOMEMethod
we get an error saying it doesn't exist. If we call
ISomeInterface -> SomeMethod
it compiles just fine.
If we rename either method it also compiles ok. I wouldn't expect a naming collision in two different interfaces but that appears to be what's happening.
We can fix it by simply renaming one of them, but i'd really like to understand the problem. Can anyone explain it for me? Thanks