Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / June 2006

Tip: Looking for answers? Try searching our database.

MFC CString in C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wcsleeman@vcu.edu - 14 Jun 2006 21:31 GMT
As my earlier post would suggest, I am using some C++ unmanaged DLLs in
a C# program. A number of the functions used in the C++ DLL have
CString as a parameter. I cannot seem to figure out the correct way to
expose the CString objects to the C# DLL call. I was able to get
parameters passed using char* and LPCTSTR.

I know I could convert all of the CStrings to LPCTSTR but it would be
best if I did not have to make many changes to the existing C++ code. I
am trying to keep all of the conversions as close to the DLL interface
or C# as possible.
msnews.microsoft.com - 16 Jun 2006 07:22 GMT
There is  not support for this in the current implementation. You could
write a custom marshaler that handles this case.

Marcus

> As my earlier post would suggest, I am using some C++ unmanaged DLLs in
> a C# program. A number of the functions used in the C++ DLL have
[quoted text clipped - 6 lines]
> am trying to keep all of the conversions as close to the DLL interface
> or C# as possible.
TDC - 16 Jun 2006 13:46 GMT
Are you trying to pass a CString to a C++ function, or get one back as
a return value?

> As my earlier post would suggest, I am using some C++ unmanaged DLLs in
> a C# program. A number of the functions used in the C++ DLL have
[quoted text clipped - 6 lines]
> am trying to keep all of the conversions as close to the DLL interface
> or C# as possible.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.