[ASAP]: Exporting CString in DLL
Tech-Archive recommends: Speed Up your PC by fixing your registry
Hi,
I worte a dll that exports the following function (all C++):
void TestFunc(int a, CString b);
this builds fine, but unfortunately, linking to this DLL does not work
(LNK2019). The problem seems to be the CString parameter...but I don't know
why (if I remove all CString parameters in my functions, everything works
fine).
All DLLs are compiled by the same compiler (VS2005) and are MFC (stat.
link.) DLLs. Isn't it possible to use CString in exported functions...any
ideas?
Thanks,
Peter
.
Relevant Pages
- Re: VC++ 6.0 DLL Using CString used in VC++ 2008
... CString in both return codes and function arguments. ... There is no way I can change the DLL, so my only idea is that I need to ... compiler-independent interface. ... fantasy world, compiler-dependent interfaces never change). ... (microsoft.public.vc.mfc) - Re: VC++ 6.0 DLL Using CString used in VC++ 2008
... CString in both return codes and function arguments. ... There is no way I can change the DLL, so my only idea is that I need to ... compiler-independent interface. ... (microsoft.public.vc.mfc) - Re: passing a string to a dll
... Should I avoid C++ as much as possible inside the DLL? ... If you want to build an MFC extension DLL, I think that passing CString ... exported CString built in ANSI into an exe built in Unicode, ... or other string classes *inside* the DLL implementation. ... (microsoft.public.vc.mfc) - Re: Sorry - basic Q about using char[] instead of CString
... I've got a call to an external DLL I'm using LoadLibrary to get. ... lpFUNCTION MyFunc(CString p1, CString p2, short* retVal, CString* retText) ... these would be better declarations for an MFC interface. ... (microsoft.public.vc.mfc) - Re: VC++ 6.0 DLL Using CString used in VC++ 2008
... I receive errors because the declaration of CString has changed. ... My error lists the VC++ 2008 CString definition (since it isn't found in the DLL) but I can't think of a way to get the VC++ 6.0 revision of CString. ... As it is, you will either have to stick with VC6 for your whole application, or use VC6 to wrap the existing DLL functionality in another DLL which has a compiler-independent interface. ... I'm hoping that someone knows how to determine was a VC++ 6.0 CString's "standard" template definition is. ... (microsoft.public.vc.mfc) |
|