thanks for the fast replies =)
thats an interesting way. but it only works for functions right?? what about classes/methods? like in my case where the method of a class take in a string, and I want it to toggle between unicode and non unicode depending on the client settings.
Do i have to create two classes then in the public header file get the appropriate class base on the unicode project settings?? e.g
P.S i omit the other things like having a interface for the DLL class etc as it would make the post too long
//the dll fileclass foo_unicode{public: void DoSomething(std::wstring val);};class foo_non_unicode{public: void DoSomething(std::string val);};
then in the public header file i do something like
#ifdef UNICODEfoo_unicode GetFooClass();#elsefoo_non_unicode GetFooClass();#endif
But doing so would make the DLL return different classes which would break when the client toggle between unicode and non unicode.