#define DLLIMPORTOREXPORT dllimport
#define DLLIMPORTOREXPORT dllexport
extern"C"_declspec(DLLIMPORTOREXPORT) int PlayARound(int &score, int &numAsked, char roundName);
The demo.dll contains a function that plays a round of a quiz and then returns the score and the number of questions answered. I am informed that the function call should take this form:-
signature int PlayARound(int &score, int &numAsked, char roundName)
call PlayARound(score, numAsked, "demo.dll");
...so yeah I get a value for the handle ok but the GetProcAddress always comes back null so I am obviously not calling the function correctly or something like that. When I say this is my code I mean this is my current code as I have tried numerous combinations of parameter passing and am now getting bored of dredging through forum threads and getting totally diverted.
ps. my directory linking and dependencies are all set and i have changed project defaults to accept multbyte instead of unicode.i have tried different calling conventions as well. i am using visual studio2010.
ok but how do I get the undecorated names, decorated?
The functions in the dll play a round of a quiz and then return the amount of questions asked and the score attained. I have a loadlibrary.lib file given to me as an example but now have to make my own.