I can create this class without error in a console .EXE, and it works fine. The class is in a .DLL called by the console app.
When I compile the app as a .DLL, with no other changes at all, the class can't be instantiated, and blows up with Invalid Access deep in Windows.
The app is native C++ without /clr. The .DLL containing the class is C++ with /clr.
In both cases, everything compiles without error.
Here's the code:
YahooAPIWrapper yahoo; // <--- this line blows up.
The class is declared in a separate .DLL as:
private: YahooAPIWrapperPrivate* _private;
public: double GetBid(const char* symbol);
public: double GetAsk(const char* symbol);
public: const char* GetCapitalization(const char* symbol);
public: const char** GetValues(const char* symbol, const char* fields);
How could there be any difference between a console app and .DLL in the way they initialize a class? There must be something wrong in my setup, but I can't see what it might be, the code is so simple.