You have too many pointers there.
typedef void UpdateAndRender_t(); - this is function type
You use it like this: "UpdateAndRender_t *UpdateAndRender;" - this creates UpdateAndRender that is pointer to function.
If you have this:
typedef void (*UpdateAndRender_t)(); - that is already pointer to function.
Then doing "UpdateAndRender_t *UpdateAndRender;" - means you are creating pointer to pointer to function.
I suggest you to do only this:
| // create function type
typedef void UpdateAndRender_t();
// inside win32_dll_code create member that is pointer to function
UpdateAndRender_t* UpdateAndRender;
// to assign pointer just do regular cast:
res.UpdateAndRender = (UpdateAndRender_t*) GetProcAddress(res.DLL, "UpdateAndRender");
// and to call it, the dereferencing is optional in C
game.UpdateAndRender();
|