public static TProxy GetExportedStaticVariable <TProxy>(this DkmNativeModuleInstance moduleInstance, string name) where TProxy : IDataProxy { ulong address = GetExportedStaticVariableAddress(moduleInstance, name); return(DataProxy.Create <TProxy>(moduleInstance.Process, address)); }
public TProxy this[long index] { get { TProxy result = DataProxy.Create <TProxy>(Process, Address); if (index != 0) { result = result.GetAdjacentProxy(index); } return(result); } }
public TObject Allocate <TObject>(long extraBytes = 0) where TObject : PyObject { ulong ptr = Allocate(StructProxy.SizeOf <TObject>(_process) + extraBytes); var obj = DataProxy.Create <TObject>(_process, ptr, polymorphic: false); obj.ob_refcnt.Write(1); var pyType = PyObject.GetPyType <TObject>(_process); obj.ob_type.Write(pyType); return(obj); }
protected TProxy GetFieldProxy <TProxy>(StructField <TProxy> field, bool polymorphic = true) where TProxy : IDataProxy { return(DataProxy.Create <TProxy>(Process, Address.OffsetBy(field.Offset), polymorphic)); }