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

Managed C++/CLI

 
GeneralRe: TCP packet sniffer Pin
Albert Holguin25-Jul-11 6:33
professionalAlbert Holguin25-Jul-11 6:33 
Questioncliext relative to pair and managed types [modified] Pin
SomewhereEverywhere20-Jul-11 15:19
SomewhereEverywhere20-Jul-11 15:19 
AnswerRe: cliext relative to pair and managed types Pin
John Schroedl21-Jul-11 4:25
professionalJohn Schroedl21-Jul-11 4:25 
GeneralHow to generate wsdl in CLR console application? Pin
aupres8-Jul-11 21:17
aupres8-Jul-11 21:17 
QuestionRe: How to generate wsdl in CLR console application? Pin
Mark Salsbery9-Jul-11 6:33
Mark Salsbery9-Jul-11 6:33 
Questionhow to use crystal report in c++/clr ? Pin
Mahdi.mpst7-Jul-11 0:24
Mahdi.mpst7-Jul-11 0:24 
AnswerRe: how to use crystal report in c++/clr ? Pin
thatraja9-Jul-11 18:40
professionalthatraja9-Jul-11 18:40 
QuestionTypical issues in managed c++ Pin
sukumarvg4-Jul-11 2:03
sukumarvg4-Jul-11 2:03 
Hi all

we have unmanaged C++ third party library which needs to be used in C# Environment. hence I am writing managed C++ wrapper on top

to use it in C# environment

I came across some of the situation put me into trouble.Can any one resolve my doubts

1) I was using the pin pointers to convert from managed string (String^) to unmanaged string(char * buffer)

is it safe? are there any performance issues with this ?

If then what is the best logic to do? please see the code snippet below i used

for converting from C# string to char * buffer(unmanaged string)

bool bRet = false;
pin_ptr<const wchar_t> w_string = PtrToStringChars(s);

size_t converted_chars = 0;
size_t size_bytes = ((s->Length + 1) * 2);

if ((size_bytes / 2) <= output_len)
{
memset(output, '\0', output_len);
if (!wcstombs_s(&converted_chars, output, output_len, w_string, size_bytes))
bRet = true;
}

return bRet;

2)Can i use System::Generic::Collections such as Dictionary and List for sending data from C# to managedC++

and viceversa?

I need to send collection of datasets from managed C++ to C# code. Can i use the List to do this.
if not are there any best practices to achieve this?

3)Is it necessary to use gc when i am creating any memory in managed C++

Waiting for ur reply

Thanks in advance

Sukumar
AnswerRe: Typical issues in managed c++ Pin
ian__lindsay4-Jul-11 5:45
ian__lindsay4-Jul-11 5:45 
GeneralRe: Typical issues in managed c++ Pin
sukumarvg6-Jul-11 22:29
sukumarvg6-Jul-11 22:29 
GeneralRe: Typical issues in managed c++ Pin
John Schroedl21-Jul-11 4:30
professionalJohn Schroedl21-Jul-11 4:30 
GeneralBook for Managed Extenstion for Vc++ Pin
Vijjuuu.1-Jul-11 21:34
Vijjuuu.1-Jul-11 21:34 
GeneralRe: Book for Managed Extenstion for Vc++ Pin
Ger Hayden1-Jul-11 22:44
Ger Hayden1-Jul-11 22:44 
GeneralRe: Book for Managed Extenstion for Vc++ Pin
Vijjuuu.3-Jul-11 7:22
Vijjuuu.3-Jul-11 7:22 
QuestionRe: Book for Managed Extenstion for Vc++ Pin
Mark Salsbery3-Jul-11 7:50
Mark Salsbery3-Jul-11 7:50 
GeneralRe: Book for Managed Extenstion for Vc++ [modified] Pin
ian__lindsay4-Jul-11 5:34
ian__lindsay4-Jul-11 5:34 
GeneralRe: Book for Managed Extenstion for Vc++ Pin
Vijjuuu.4-Jul-11 21:08
Vijjuuu.4-Jul-11 21:08 
QuestionProblem with managed and unmanaged mixed coding Pin
Lighter Joul1-Jul-11 13:56
Lighter Joul1-Jul-11 13:56 
AnswerRe: Problem with managed and unmanaged mixed coding Pin
Philippe Mori1-Jul-11 15:45
Philippe Mori1-Jul-11 15:45 
GeneralRe: Problem with managed and unmanaged mixed coding Pin
Lighter Joul2-Jul-11 1:33
Lighter Joul2-Jul-11 1:33 
GeneralRe: Problem with managed and unmanaged mixed coding Pin
Philippe Mori2-Jul-11 1:55
Philippe Mori2-Jul-11 1:55 
GeneralRe: Problem with managed and unmanaged mixed coding Pin
Lighter Joul2-Jul-11 3:35
Lighter Joul2-Jul-11 3:35 
QuestionEDIT CONTROL password style Pin
RomTibi30-Jun-11 7:04
RomTibi30-Jun-11 7:04 
AnswerRe: EDIT CONTROL password style Pin
Mark Salsbery30-Jun-11 8:20
Mark Salsbery30-Jun-11 8:20 
QuestionDebugging an application minidump using windbg Pin
Prasann Mayekar9-Jun-11 23:01
Prasann Mayekar9-Jun-11 23:01 

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.