views:

59

answers:

0

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?