MyClass is a singleton class (There will only ever be one of these in my whole program).
What I want to do is follows.
1. Add data to my class using AddData, get a function pointer returned that I can then pass to 'another' function in a dll.
2. Then this 'other' function calls my call back function
Just a guess here, but DataReceivedCallback is a (function)pointer, having a reference of a pointer makes no sense, try removing the & in the someDllFunction
error C2872: 'DataReceivedCallback' : ambiguous symbol
That would mean that you have two (or more) declarations of DataReceivedCallback and the compiler does not know which to use.
Also, is the code posted above actual code or a quick mockup? Because unless MyCallBackFunction() is static you should have a pointer to member function typedefvoid (MyClass::*DataReceivedCallback)(int, int);
sorry its a quick mockup, yes the callback function is static. NOW UPDATED
re: That would mean that you have two (or more) declarations of DataReceivedCallback and the compiler does not know which to use.
Yes youare right, I have defined typedefvoid (*DataReceivedCallback)(int, int);
in my original class and also in my dll project as the dll is complaining that DataReceivedCallback is undefined.
re: Just a guess here, but DataReceivedCallback is a (function)pointer, having a reference of a pointer makes no sense, try removing the & in the someDllFunction