Re: [ASAP]: Exporting CString in DLL

Tech-Archive recommends: Speed Up your PC by fixing your registry



"Peter Schmitz" <PeterSchmitz@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0985C59C-EA05-431E-8AC4-098A2F4AC55C@xxxxxxxxxxxxxxxx
Hi,

thanks for replying! All DLLs use the same function declarations and
LPTCSTR
results in the same linker error. When I remove the strings (for testing
purposes) from the declaration, everything works and links fine....any
ideas?

One last thing. The DLLs that make use of the exported functions of the
new
DLL are converted to the new VS2005 format, the DLL that exports the
function
was created directly with the latest version.

Firstly, CString sucks when working with DLLs because you have to make sure
the type matches (CStringA or CStringW).

Secondly, are you using T defines? ie: _UNICODE and UNICODE.

--
- Mark Randall
http://www.temporal-solutions.co.uk

"We're Systems and Networks..."
"It's our job to know..."


.



Relevant Pages

  • Re: [ASAP]: Exporting CString in DLL
    ... sure the type matches. ... No. CString works absolutely fine when working with DLLs. ... *do* have to make sure you have UNICODE defined consistently in all, ...
    (microsoft.public.vc.language)
  • Re: Compiling VB6 code to DLL
    ... applying the method to a string function. ... Internally VB keeps all strings as Unicode, ... DLLs or to files) it converts Unicode to ANSI on the way out and then ...
    (microsoft.public.vb.winapi)
  • Re: Is there any problems if there are multiple MFC dlls in one pr
    ... Suppose the DLLs use extern "C" linkages: ... function is the string ... Many third-party DLLs use extern "C" linkages because they want to be usable from C as ... These will definitely Not Play Well with Unicode. ...
    (microsoft.public.vc.mfc)
  • Re: CString link error in VC7 with MFC extersion dll which export functions using CString as paramet
    ... You CANNOT mix MFC Dlls from VC6 ... I run into a cstring related link problem in VC7. ... My solution has 3 projects, one MFC exe, two MFC extersion DLL. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: CString Memory Leak
    ... Ich würde DLLs immer so bauen, dass nur elementare Vaiablen verwendet werden, die alle Programme nutzen können und vor allem nicht Heapmanager abhängig sind. ... Schon ganz und gar wen ein CString exportiert wird. ... Die Nutzung von Setter und Getter würde es auch ermöglichen das Memory Tracing für diese Variable auszuschalten, denn es ist ja kein Leak was wirklich schmerzt, sondern einfach durch die Nutzung einer globalen Variable in Kauf genommen werden kann! ... Aber das ist genau das Problem mit solchen Variablen in DLLs. ...
    (microsoft.public.de.vc)