public int Bind(IntPtr szName, uint lHashVal, ushort wFlags, ref IntPtr ppTInfo, ref DESCKIND pDescKind, ref BINDPTR pBindPtr) { if (m_BindFunc == null) { var fp = GetFunctionPointer(3); m_BindFunc = (BindFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(BindFunc)); } return(m_BindFunc(m_ptr, szName, lHashVal, wFlags, ref ppTInfo, ref pDescKind, ref pBindPtr)); }
public unsafe int RemoteBind(char* szName, uint lHashVal, ushort wFlags, ITypeInfo* ppTInfo, DESCKIND* pDescKind, FUNCDESC** ppFuncDesc, VARDESC** ppVarDesc, ITypeComp* ppTypeComp, CLEANLOCALSTORAGE* pDummy) { ITypeComp_vtbl** @this = (ITypeComp_vtbl**)reference; ITypeComp_vtbl* vtbl = *@this; if (vtbl == null) throw new InvalidComObjectException(); Delegate genericDelegate = Marshal.GetDelegateForFunctionPointer(vtbl->method_3, typeof(delegate_3)); delegate_3 method = (delegate_3)genericDelegate; return method(@this, szName, lHashVal, wFlags, ppTInfo, pDescKind, ppFuncDesc, ppVarDesc, ppTypeComp, pDummy); }