/// <summary> /// Gets a metadata interface object that can be used to examine the /// metadata for the module. /// </summary> /// <param name="riid"> /// The reference ID that specifies the metadata interface. /// </param> /// <param name="obj"> /// An object that is one of the metadata interfaces /// (see https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/metadata/metadata-interfaces). /// </param> /// <remarks> /// The debugger can use this method to make a copy of the original /// metadata for a module, which it must do in order to edit that /// module. The debugger calls this to get an <c>IMetaDataEmit</c> /// interface object for the module, then calls <c>IMetaDataEmit::SaveToMemory</c> /// to save a copy of the module's metadata to memory. /// </remarks> public int GetMetaDataInterface(Guid riid, out Unknown obj) { void **pObj = default; int result = Calli(_this, This[0]->GetMetaDataInterface, &riid, &pObj); ComFactory.Create(pObj, out obj); return(result); }
/// <summary> /// Gets the module that corresponds to the given metadata interface. /// </summary> /// <param name="metadata"> /// An object that is one of the Metadata interfaces. /// See https://docs.microsoft.com/en-us/dotnet/framework/unmanaged-api/metadata/metadata-interfaces. /// </param> /// <param name="module"> /// The module corresponding to the given metadata interface. /// </param> public int GetModuleFromMetaDataInterface(Unknown metadata, out CorDebugModule module) { void *pModule = default; using var pMetadata = metadata?.AcquirePointer(); int result = Calli(_this, This[0]->GetModuleFromMetaDataInterface, pMetadata, &pModule); module = ComFactory.Create <CorDebugModule>(pModule); return(result); }
public int GetManagedCopy(out Unknown @object) => InvokeGetObject(_this, This[0]->GetManagedCopy, out @object);
public int SetFromManagedCopy(Unknown @object) { using var pObject = @object.AcquirePointer(); return(Calli(_this, This[0]->SetFromManagedCopy, pObject)); }
public int EnumerateObjects(out Unknown objects) => InvokeGetObject(_this, This[0]->EnumerateObjects, out objects);