Click here to Skip to main content
15,916,683 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: How to use timeSetEvent in C++/CLI Pin
oshah13-May-06 11:31
oshah13-May-06 11:31 
QuestionGetCurrentDirectory() Pin
rahultaing30-Apr-06 14:11
rahultaing30-Apr-06 14:11 
AnswerRe: GetCurrentDirectory() Pin
Milton Karimbekallil30-Apr-06 18:52
Milton Karimbekallil30-Apr-06 18:52 
GeneralRe: GetCurrentDirectory() Pin
Milton Karimbekallil5-May-06 13:28
Milton Karimbekallil5-May-06 13:28 
QuestionGame Programming Pin
Akidomero29-Apr-06 20:07
Akidomero29-Apr-06 20:07 
QuestionHTTP: Pin
Anthony Moss28-Apr-06 5:45
Anthony Moss28-Apr-06 5:45 
AnswerRe: HTTP: Pin
led mike4-May-06 12:26
led mike4-May-06 12:26 
QuestionHow to call unmanaged C++ DLL method with a CString reference Pin
Bo Skjoett27-Apr-06 23:02
Bo Skjoett27-Apr-06 23:02 
I am building a managed C++ wrapper DLL around an unmanaged C++ DLL that uses MFC CStrings in its public interface. The unmanaged C++ DLL contains a class that I need to access. My problem is that this class contains methods using CString references, such as:

void SetName(const CString& name);

How can I call this method from my managed C++ code?

I have tried this in my wrapper code:

void CMfcDllWrapper::SetName(System::String^ str)
{
CString s(str);
m_pUnmanaged->SetName(s);
}

where m_pUnmanaged points to the C++ object in the unmanaged DLL. However, this approach causes a linker error, so I am not using the correct signature for a CString reference.

An a similar example where the CString is passed by value everything works, but with pass by reference I am stuck.

PS: I am using VS2005

Can anyone give some advise , please?
Thanks
Bo
AnswerRe: How to call unmanaged C++ DLL method with a CString reference Pin
Milton Karimbekallil28-Apr-06 2:01
Milton Karimbekallil28-Apr-06 2:01 
Questionadding dll Pin
rahultaing25-Apr-06 13:41
rahultaing25-Apr-06 13:41 
AnswerRe: adding dll Pin
2bee 25-Apr-06 23:50
2bee 25-Apr-06 23:50 
GeneralRe: adding dll Pin
George L. Jackson26-Apr-06 9:00
George L. Jackson26-Apr-06 9:00 
Questionspeed data access in server Pin
sabitasamal24-Apr-06 20:40
sabitasamal24-Apr-06 20:40 
Questioni have problems Pin
sieucauthu23-Apr-06 19:12
sieucauthu23-Apr-06 19:12 
AnswerRe: i have problems Pin
Steve Pullan23-Apr-06 19:29
Steve Pullan23-Apr-06 19:29 
GeneralRe: i have problems Pin
sieucauthu23-Apr-06 19:49
sieucauthu23-Apr-06 19:49 
QuestionUsing serial ports in vs on xp Pin
McFly55523-Apr-06 10:37
McFly55523-Apr-06 10:37 
AnswerRe: Using serial ports in vs on xp Pin
2bee 23-Apr-06 11:34
2bee 23-Apr-06 11:34 
GeneralRe: Using serial ports in vs on xp Pin
McFly55524-Apr-06 14:52
McFly55524-Apr-06 14:52 
GeneralRe: Using serial ports in vs on xp Pin
2bee 24-Apr-06 20:30
2bee 24-Apr-06 20:30 
GeneralRe: Using serial ports in vs on xp Pin
TheCat00722-Jun-06 18:16
TheCat00722-Jun-06 18:16 
QuestionCan anyone tell me why am i getting these errors? Pin
rahultaing22-Apr-06 22:45
rahultaing22-Apr-06 22:45 
AnswerRe: Can anyone tell me why am i getting these errors? Pin
George L. Jackson23-Apr-06 1:48
George L. Jackson23-Apr-06 1:48 
Questionhow can i update the code of my server! Pin
farshad.f22-Apr-06 6:57
farshad.f22-Apr-06 6:57 
Questionproblem with mail && messenger services! Pin
farshad.f21-Apr-06 19:06
farshad.f21-Apr-06 19:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.