If(retValue = true) // will not work as intended Upon return of "true" if your subsequent code uses (and calling convention screws-up stack pointer again)Īnd be careful about the return value. RetB = fortranCall(&B) // *** not passing address of B *** RetA = fortranCall(&A) // calling convention screws-up stack pointer If the Fortran subroutine is not using the same calling convention it will be likely that you have corrupted the stack. ![]() What is the value of the pointer to p at the time of error? (not the value pointed to by p)Īlso, I believe you want extern "C" for calling convention (caller cleans up stack) as opposed to _stdcall. ![]() ![]() Then if the other values within the function remain constant for the duration of the application the only variable is the pointer to p.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |