Why Exception occured getting address of COM function ?
Posted
by Usman
on Stack Overflow
See other posts from Stack Overflow
or by Usman
Published on 2010-05-13T07:29:30Z
Indexed on
2010/05/13
7:34 UTC
Read the original article
Hit count: 440
I am getting address of COM function by loading type library (TLB) and iterating over types using ITypeLib
and ITypeInfo
.
After calling AddressOfMember
function of ITypeInfo I am facing the following exception:
System.Runtime.InteropServices.COMException (0x800288BD): Wrong module kind for the operation. (Exception from HRESULT: 0x800288BD (TYPE_E_BADMODULEKIND)) at System.Runtime.InteropServices.ComTypes.ITypeInfo.AddressOfMember(Int32 memid, INVOKEKIND invKind, IntPtr& ppv).
Any idea how to get rid of this excpetion?
© Stack Overflow or respective owner