150 |
|
|
151 |
|
#region IPatchMemory members |
152 |
|
#region public virtual bool PatchMemory(uint address, byte value) |
153 |
< |
public virtual bool PatchMemory(uint address, byte value) |
153 |
> |
public virtual bool PatchMemory(ulong address, byte value) |
154 |
|
{ |
155 |
|
if (!EnsureProviderIsOpen()) { return false; } |
156 |
|
return provider.PatchMemory(address, value); |
157 |
|
} |
158 |
|
#endregion |
159 |
|
#region public virtual bool PatchMemory(uint address, sbyte value) |
160 |
< |
public virtual bool PatchMemory(uint address, sbyte value) |
160 |
> |
public virtual bool PatchMemory(ulong address, sbyte value) |
161 |
|
{ |
162 |
|
if (!EnsureProviderIsOpen()) { return false; } |
163 |
|
return provider.PatchMemory(address, value); |
164 |
|
} |
165 |
|
#endregion |
166 |
|
#region public virtual bool PatchMemory(uint address, ushort value) |
167 |
< |
public virtual bool PatchMemory(uint address, ushort value) |
167 |
> |
public virtual bool PatchMemory(ulong address, ushort value) |
168 |
|
{ |
169 |
|
if (!EnsureProviderIsOpen()) { return false; } |
170 |
|
return provider.PatchMemory(address, value); |
171 |
|
} |
172 |
|
#endregion |
173 |
|
#region public virtual bool PatchMemory(uint address, short value) |
174 |
< |
public virtual bool PatchMemory(uint address, short value) |
174 |
> |
public virtual bool PatchMemory(ulong address, short value) |
175 |
|
{ |
176 |
|
if (!EnsureProviderIsOpen()) { return false; } |
177 |
|
return provider.PatchMemory(address, value); |
178 |
|
} |
179 |
|
#endregion |
180 |
|
#region public virtual bool PatchMemory(uint address, uint value) |
181 |
< |
public virtual bool PatchMemory(uint address, uint value) |
181 |
> |
public virtual bool PatchMemory(ulong address, uint value) |
182 |
|
{ |
183 |
|
if (!EnsureProviderIsOpen()) { return false; } |
184 |
|
return provider.PatchMemory(address, value); |
185 |
|
} |
186 |
|
#endregion |
187 |
|
#region public virtual bool PatchMemory(uint address, int value) |
188 |
< |
public virtual bool PatchMemory(uint address, int value) |
188 |
> |
public virtual bool PatchMemory(ulong address, int value) |
189 |
|
{ |
190 |
|
if (!EnsureProviderIsOpen()) { return false; } |
191 |
|
return provider.PatchMemory(address, value); |
192 |
|
} |
193 |
|
#endregion |
194 |
|
#region public virtual bool PatchMemory(uint address, ulong value) |
195 |
< |
public virtual bool PatchMemory(uint address, ulong value) |
195 |
> |
public virtual bool PatchMemory(ulong address, ulong value) |
196 |
|
{ |
197 |
|
if (!EnsureProviderIsOpen()) { return false; } |
198 |
|
return provider.PatchMemory(address, value); |
199 |
|
} |
200 |
|
#endregion |
201 |
|
#region public virtual bool PatchMemory(uint address, long value) |
202 |
< |
public virtual bool PatchMemory(uint address, long value) |
202 |
> |
public virtual bool PatchMemory(ulong address, long value) |
203 |
|
{ |
204 |
|
if (!EnsureProviderIsOpen()) { return false; } |
205 |
|
return provider.PatchMemory(address, value); |
209 |
|
|
210 |
|
#region IReadMemory members |
211 |
|
#region public virtual bool ReadMemory(uint address, out byte value) |
212 |
< |
public virtual bool ReadMemory(uint address, out byte value) |
212 |
> |
public virtual bool ReadMemory(ulong address, out byte value) |
213 |
|
{ |
214 |
|
value = 0; |
215 |
|
if (!EnsureProviderIsOpen()) { return false; } |
217 |
|
} |
218 |
|
#endregion |
219 |
|
#region public virtual bool ReadMemory(uint address, out sbyte value) |
220 |
< |
public virtual bool ReadMemory(uint address, out sbyte value) |
220 |
> |
public virtual bool ReadMemory(ulong address, out sbyte value) |
221 |
|
{ |
222 |
|
value = 0; |
223 |
|
if (!EnsureProviderIsOpen()) { return false; } |
225 |
|
} |
226 |
|
#endregion |
227 |
|
#region public virtual bool ReadMemory(uint address, out ushort value) |
228 |
< |
public virtual bool ReadMemory(uint address, out ushort value) |
228 |
> |
public virtual bool ReadMemory(ulong address, out ushort value) |
229 |
|
{ |
230 |
|
value = 0; |
231 |
|
if (!EnsureProviderIsOpen()) { return false; } |
233 |
|
} |
234 |
|
#endregion |
235 |
|
#region public virtual bool ReadMemory(uint address, out short value) |
236 |
< |
public virtual bool ReadMemory(uint address, out short value) |
236 |
> |
public virtual bool ReadMemory(ulong address, out short value) |
237 |
|
{ |
238 |
|
value = 0; |
239 |
|
if (!EnsureProviderIsOpen()) { return false; } |
241 |
|
} |
242 |
|
#endregion |
243 |
|
#region public virtual bool ReadMemory(uint address, out uint value) |
244 |
< |
public virtual bool ReadMemory(uint address, out uint value) |
244 |
> |
public virtual bool ReadMemory(ulong address, out uint value) |
245 |
|
{ |
246 |
|
value = 0; |
247 |
|
if (!EnsureProviderIsOpen()) { return false; } |
249 |
|
} |
250 |
|
#endregion |
251 |
|
#region public virtual bool ReadMemory(uint address, out int value) |
252 |
< |
public virtual bool ReadMemory(uint address, out int value) |
252 |
> |
public virtual bool ReadMemory(ulong address, out int value) |
253 |
|
{ |
254 |
|
value = 0; |
255 |
|
if (!EnsureProviderIsOpen()) { return false; } |
257 |
|
} |
258 |
|
#endregion |
259 |
|
#region public virtual bool ReadMemory(uint address, out ulong value) |
260 |
< |
public virtual bool ReadMemory(uint address, out ulong value) |
260 |
> |
public virtual bool ReadMemory(ulong address, out ulong value) |
261 |
|
{ |
262 |
|
value = 0; |
263 |
|
if (!EnsureProviderIsOpen()) { return false; } |
265 |
|
} |
266 |
|
#endregion |
267 |
|
#region public virtual bool ReadMemory(uint address, out long value) |
268 |
< |
public virtual bool ReadMemory(uint address, out long value) |
268 |
> |
public virtual bool ReadMemory(ulong address, out long value) |
269 |
|
{ |
270 |
|
value = 0; |
271 |
|
if (!EnsureProviderIsOpen()) { return false; } |
276 |
|
|
277 |
|
#region IMemoryReader member |
278 |
|
#region public virtual bool ReadFirstNonZeroByte(int MemoryAddress, uint bytesToRead, out int address) |
279 |
< |
public virtual bool ReadFirstNonZeroByte(int MemoryAddress, uint bytesToRead, out int address) |
279 |
> |
public virtual bool ReadFirstNonZeroByte(long MemoryAddress, uint bytesToRead, out int address) |
280 |
|
{ |
281 |
|
address = 0; |
282 |
|
if (!EnsureProviderIsOpen()) { return false; } |
285 |
|
} |
286 |
|
#endregion |
287 |
|
#region public virtual void ReadProcessMemoryAtOnce(int MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data) |
288 |
< |
public virtual void ReadProcessMemoryAtOnce(uint MemoryAddress, uint bytesToRead, object UserState) |
288 |
> |
public virtual void ReadProcessMemoryAtOnce(ulong MemoryAddress, uint bytesToRead, object UserState) |
289 |
|
{ |
290 |
|
if (!EnsureProviderIsOpen()) { return; } |
291 |
|
try { provider.ReadProcessMemoryAtOnce(MemoryAddress, bytesToRead, UserState); } |
292 |
|
catch { } |
293 |
|
} |
294 |
< |
public virtual void ReadProcessMemoryAtOnce(uint MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data) |
294 |
> |
public virtual void ReadProcessMemoryAtOnce(ulong MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data) |
295 |
|
{ |
296 |
|
bytesRead = 0x00; |
297 |
|
data = new byte[bytesToRead]; |
300 |
|
catch { bytesRead = 0x00; data = new byte[] { }; } |
301 |
|
} |
302 |
|
|
303 |
< |
public virtual void UpdateAddressArray(uint[] addresses, uint size, out byte[][] values) |
303 |
> |
public virtual void UpdateAddressArray(ulong[] addresses, uint size, out byte[][] values) |
304 |
|
{ |
305 |
|
values = new byte[addresses.Length][]; |
306 |
|
for (int x = 0; x < values.Length; x++) { values[x] = new byte[size]; } |
315 |
|
|
316 |
|
#endregion |
317 |
|
#region public virtual void ReadProcessMemory(int MemoryAddress, int bytesToRead, out int bytesRead, out byte[] data) |
318 |
< |
public virtual void ReadProcessMemory(uint MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data) |
318 |
> |
public virtual void ReadProcessMemory(ulong MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data) |
319 |
|
{ |
320 |
|
bytesRead = 0x00; |
321 |
|
data = new byte[bytesToRead]; |
323 |
|
try { provider.ReadProcessMemory(MemoryAddress, bytesToRead, out bytesRead, out data); } |
324 |
|
catch { bytesRead = 0x00; data = new byte[] { }; } |
325 |
|
} |
326 |
< |
public virtual void ReadProcessMemory(int MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data) |
326 |
> |
public virtual void ReadProcessMemory(long MemoryAddress, uint bytesToRead, out int bytesRead, out byte[] data) |
327 |
|
{ |
328 |
|
bytesRead = 0x00; |
329 |
|
data = new byte[bytesToRead]; |
343 |
|
//} |
344 |
|
//#endregion |
345 |
|
#region public virtual void WriteProcessMemory(int MemoryAddress, byte[] bytesToWrite, out int bytesWritten) |
346 |
< |
public virtual void WriteProcessMemory(int MemoryAddress, byte[] bytesToWrite, out int bytesWritten) |
346 |
> |
public virtual void WriteProcessMemory(long MemoryAddress, byte[] bytesToWrite, out int bytesWritten) |
347 |
|
{ |
348 |
|
bytesWritten = 0; |
349 |
|
if (!EnsureProviderIsOpen()) { return; } |
350 |
|
try { provider.WriteProcessMemory(MemoryAddress, bytesToWrite, out bytesWritten); } |
351 |
|
catch { bytesWritten = 0x00; } |
352 |
|
} |
353 |
< |
public virtual void WriteProcessMemory(uint MemoryAddress, byte[] bytesToWrite, out uint bytesWritten) |
353 |
> |
public virtual void WriteProcessMemory(ulong MemoryAddress, byte[] bytesToWrite, out uint bytesWritten) |
354 |
|
{ |
355 |
|
bytesWritten = 0; |
356 |
|
if (!EnsureProviderIsOpen()) { return; } |
362 |
|
#endregion |
363 |
|
#region IFileWriter members |
364 |
|
#region public virtual bool WriteProcessMemoryToFile(string filename, int MemoryAddress, uint bytesToRead, out int bytesRead) |
365 |
< |
public virtual bool WriteProcessMemoryToFile(string filename, int MemoryAddress, uint bytesToRead, out int bytesRead) |
365 |
> |
public virtual bool WriteProcessMemoryToFile(string filename, ulong MemoryAddress, uint bytesToRead, out int bytesRead) |
366 |
|
{ |
367 |
|
bytesRead = 0; |
368 |
|
if (!EnsureProviderIsOpen()) { return false; } |