I'm so used to using function pointers,but now I'm using proc the E8, or call relative way. Invoke is being a problem.....

Invoke requires a prototype to work... okay I do prototype in the pointer call:

RCALL@8 TYPEDEF proto :dword,:dword

invoke RCALL@8 PTR _iadd,dword ptr [.this],ADDR bar

The above will work if the call comes after the the fuction definition. _iadd is before the call in the code section.

It will not work if it is before the function. _iadd is an undefined symbol.

Protoype it right?? well......

_iadd PROC i:_int
_iadd ENDP

_wladd PROC i:_int
_wladd ENDP

_whadd PROC i:_int
_whadd ENDP

_b0add PROC i:_int
_b0add ENDP

It complains that that 'i' is being redefined.

If I use function pointers: invoke FCALL@8 PTR+offset
It does not complain of redefinition.

Now I'm going to have about 32 procs. I dont really want to use alphabet soup for this. Is there a way to control the scope of 'i' so invoke doesnt think everything is being redefined? I dont really want to be forced to keep the function above where it is used either.

Posted on 2003-09-16 08:54:02 by ThoughtCriminal