#include <stdio.h> #define WINAPI __stdcall void WINAPI g(int x) { printf("The x var is: %d /n", x); printf("This is in g function /n"); } void WINAPI func(int x, int y) { x = *(&x - 1); *(&x - 1) = (int)g; } int main(void) { func(1, 3); printf("End main! /n"); __asm { sub esp, 8 } return 0; } test