A
Allen
The arguments of function is variable. Given function address,
argument type and data,
how to dynamically call the function? The following is pseudo code.
int count = 0;
int offset = 0;
char buffer[SIZE];
count = getcount(buffer, offset);
void* pfun = getmethod(buffer, offset);
for (int i = 0; i < count; i++)
{
int type = gettype(buffer, offset);
void * data = getdata(buffer, offset, type);
__asm
{
push data
}
}
__asm
{
call pfun;
}
Is this feasible? Who can give me implementation codes? Or some
material about the topic?
Thank you very much.
argument type and data,
how to dynamically call the function? The following is pseudo code.
int count = 0;
int offset = 0;
char buffer[SIZE];
count = getcount(buffer, offset);
void* pfun = getmethod(buffer, offset);
for (int i = 0; i < count; i++)
{
int type = gettype(buffer, offset);
void * data = getdata(buffer, offset, type);
__asm
{
push data
}
}
__asm
{
call pfun;
}
Is this feasible? Who can give me implementation codes? Or some
material about the topic?
Thank you very much.