相关疑难解决方法(0)

从vc ++调用存储在堆中的代码

想象一下,我正在做这样的事情:

void *p = malloc (1000);
*((char*)p) = some_opcode;
*((char*)p+1) = another_opcode; // for the sake of the example: the opcodes are ok

....
etc...
Run Code Online (Sandbox Code Playgroud)

如何定义一个函数指针来调用p,好像它是一个函数?(我使用的是VC++ 2008 express).

谢谢

c++ assembly pointers function-pointers opcode

11
推荐指数
3
解决办法
1304
查看次数

标签 统计

assembly ×1

c++ ×1

function-pointers ×1

opcode ×1

pointers ×1