"\xEB" is a string, the "\x" is an escape sequence which tells the compiler to interpret the next 2 characters as a hex value and insert it into the string.
its actually the same as
Code:
BYTE Buf[] = { 0xEB, 0x00 }; // 0x00 because of the trailing zero character of the string. because only the first byte is accessed at Writeprocessmemory it doesnt really matter.
so it wrill wite one byte with 0xEB to 0x0040CAE1.
"\xEB" is a string, the "\x" is an escape sequence which tells the compiler to interpret the next 2 characters as a hex value and insert it into the string.
its actually the same as
Code:
BYTE Buf[] = { 0xEB, 0x00 }; // 0x00 because of the trailing zero character of the string. because only the first byte is accessed at Writeprocessmemory it doesnt really matter.
so it wrill wite one byte with 0xEB to 0x0040CAE1.
Mhm. I'll prob. try to do it with VB or C#. But \xEB is not valid for VB and C#. How can i do it with 4 byte or float value instead of \xEB ?
[question] memcpy, access violation 10/02/2011 - General Coding - 1 Replies is it ok to type cast byte buffer by (void*)?
DWORD dwAddress = 0x12345678;
BYTE bPatch = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
memcpy( (void*)dwAddress, (void*)bPatch, 7);
this piece of my code was working fine till now - it is causing ACCESS VIOLATION and I can't figure out why.
edited:
nvm, it was all about memory protection.
C++ Memcpy 12/28/2010 - C/C++ - 6 Replies Hey Leute,
wie immer!! hab mal ne Frage ;D Kann mir einer denn Fehler im Source sagen?!
Source:
#include <Windows.h>
#include <stdio.h>
#pragma warning(disable: 4312)
void Hack()
{
[c++] memcpy, float, address 07/21/2010 - Kal Online - 0 Replies omfg, how to write float value using memcpy?
DWORD addr = 0x12345678;
FLOAT value = { 100, 200, 300 };
memcpy((void*)addr, (void*)((FLOAT)value),4);
gives me an engine crash.
EDITED:
problem solved. nvm lol. please, delete this thread.