Did you define the body of CTest::QueryInterface() in the header file rather than in the .cpp file? If so you may get this error.
polyglot
2009-07-17 15:57:21
Did you define the body of CTest::QueryInterface() in the header file rather than in the .cpp file? If so you may get this error.
The problem is you are not linking properly to the ATL lib files. Check your project options in Visual Studio and make sure you are statically linking to ATL.
Thanks for the answers, but the issue in the end seems to of been that I was trying to QueryInterface from the constructor. Once I moved it to a separate method everything worked fine.
Does anyone have any docs on why you cannot call QueryInterface from a constructor?