Quote:
|
Although still have errors, the metholodgy ragdog mentioned should be ok
|
not exactly...
again a problem of calling conventions...
newtolower() must be CDECL since the stack is adjusted on return by the caller.. Please google for calling conventions...
In first newtolower.asm you will obtain a decorated name _newtolower@0: that's not ok, it is a STDCALL decoration with 0 bytes as arguments
In second newtolower.asm you will obtain a decorated name _newtolower@4:
that's not ok, it is a STDCALL decoration with 4 bytes as arguments (it gots linked because the function declaration is coherent in both files, but the stack will be corrupted).
So the correct ASM must be:
Code:
newtolower proc near c
But also newtest.c is not correct, since newtolower must not declared as WINAPI (stdcall). Remove it (the default is CDECL):
Code:
extern int newtolower(int);
Finally, the program will yet trap because __getptd is calling
which is a call to 0!
Best regards, bilbo