Accessing struct pointer in c++ dll causes access violation
I wrote a c++ dll in QT using mingw 64 bit. It has a function that takes a void * argument because the data passed in varies depending on some other fields. When I call this function passing in a pointer to a struct, the program always crashes trying to access fields. I have tried to access the data both using the same struct as a pointer, and by using base data type pointers like unsigned char *. Here is some example code: