public void GetLibAttr(out IntPtr ppTLibAttr) { // Fail BEFORE allocating the handle to avoid leaks. If the real COM object fails in this method // and doesn't return the handle or clean it up itself there's not much we can do to avoid the leak. _faultInjector.FailurePointThrow(MockTypeLibrariesFailurePoints.ITypeLib_GetLibAttr); ppTLibAttr = _memoryHelper.AllocateHandle(Marshal.SizeOf <TYPELIBATTR>()); Marshal.StructureToPtr(this.Attributes, ppTLibAttr, false); }
void IFixedTypeInfo.GetRefTypeOfImplType(int index, out System.IntPtr href) { Assert.True(index >= 0 && index < _typeAttributes.cImplTypes); _faultInjector.FailurePointThrow(MockTypeLibrariesFailurePoints.ITypeInfo_GetRefTypeOfImplType); href = ((System.IntPtr)index + s_HREF_IMPLTYPES_OFFSET); }