Je remonte ce topic vu que je viens de trouver une solution sur un forum :
- include <stdio.h>
typedef unsigned char byte;
byte my_func_data[]=
{
0xB8,0x01,0x00,0x00,0x00,// mov eax,1
0xC3,// ret
};
typedef unsigned long (*my_func)(void);
int main()
{
my_func func=(my_func)my_func_data;
unsigned long ret=func();
printf("result: %u\n",ret);
return 0;
}
Simple, mais il suffisait d´y penser.