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

Managed C++/CLI

 
GeneralRe: operator[] in 2.0 Pin
Bill Gafford19-Jan-05 9:46
Bill Gafford19-Jan-05 9:46 
GeneralDetecting the phone number from C++ Pin
Bharat Gidde5-Jan-05 6:20
Bharat Gidde5-Jan-05 6:20 
GeneralRe: Detecting the phone number from C++ Pin
Christian Graus5-Jan-05 11:45
protectorChristian Graus5-Jan-05 11:45 
GeneralRe: Detecting the phone number from C++ Pin
Maximilien6-Jan-05 9:42
Maximilien6-Jan-05 9:42 
GeneralMirror Text Pin
dado745-Jan-05 2:47
dado745-Jan-05 2:47 
GeneralRe: Mirror Text Pin
Christian Graus5-Jan-05 11:46
protectorChristian Graus5-Jan-05 11:46 
GeneralMCppWrapper example Pin
eusjmf4-Jan-05 7:54
eusjmf4-Jan-05 7:54 
GeneralRe: MCppWrapper example Pin
ursus zeta5-Jan-05 10:52
ursus zeta5-Jan-05 10:52 
The Interop marshaler makes the conversion of the data types in both directions. The Visual C++ .NET designers set up a very elaborate data marshaling mechanism so that the .NET applications could use unmanaged (principally COM) code. For more information, go over to the MSDN site and search .NET Development for Data Marshaling and Platform Invoke. Try this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconinteropmarshalingoverview.asp[^]

The answer to the second question is a little more complicated. Conceivably, you could use that String* a number of times in your code. The Interop marshaler creates a char buffer and allocates the String on the CLR heap, copying the data between them whenever Interop is invoked. Also, a number of other calls are made. If a lot of data is transferred, this can have performance penalties. To be honest, I haven't read the code for that sample, but, I's guess that the char* is freed when there are no more references to it within the stack frame (I'd have to look it up to be sure).
Also, check out these two related topics:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconmemorymanagement.asp[^]

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconmarshalingstrings.asp[^]
GeneralRe: MCppWrapper example Pin
eusjmf6-Jan-05 3:53
eusjmf6-Jan-05 3:53 
Generalproblem with Application::CommonAppDataPath Pin
maos3-Jan-05 9:03
maos3-Jan-05 9:03 
GeneralNOTIFYICONDATA missing data Pin
cimnik02931-Dec-04 6:35
cimnik02931-Dec-04 6:35 
QuestionHow Create a Printer Port Monitor?? Pin
raf-sp30-Dec-04 7:39
raf-sp30-Dec-04 7:39 
GeneralHelp with MDI (VS 2003 Forms Designer) Pin
ZisisSim29-Dec-04 22:19
ZisisSim29-Dec-04 22:19 
QuestionWhat are the difference between these Main function in MC++? Pin
Link260025-Dec-04 22:42
Link260025-Dec-04 22:42 
AnswerRe: What are the difference between these Main function in MC++? Pin
Anonymous27-Dec-04 9:35
Anonymous27-Dec-04 9:35 
GeneralExecuting Application Pin
Rich Wright24-Dec-04 4:51
Rich Wright24-Dec-04 4:51 
GeneralRe: Executing Application Pin
Christian Graus5-Jan-05 11:47
protectorChristian Graus5-Jan-05 11:47 
GeneralHelp required on clustering Pin
proteas20-Dec-04 0:01
proteas20-Dec-04 0:01 
GeneralManaged .NET DLL with c++ Pin
BeerFizz19-Dec-04 7:04
BeerFizz19-Dec-04 7:04 
GeneralRe: Managed .NET DLL with c++ Pin
ursus zeta21-Dec-04 12:33
ursus zeta21-Dec-04 12:33 
GeneralRe: Managed .NET DLL from UnManaged c++ Pin
BeerFizz24-Dec-04 0:45
BeerFizz24-Dec-04 0:45 
GeneralSorry, Holidays. Pin
ursus zeta4-Jan-05 12:47
ursus zeta4-Jan-05 12:47 
Generaldeclaring arrays in function (please help) Pin
Toximus19-Dec-04 6:06
Toximus19-Dec-04 6:06 
GeneralRe: declaring arrays in function (please help) Pin
Christian Graus20-Dec-04 9:31
protectorChristian Graus20-Dec-04 9:31 
Generalwant the source code of this riddle! Pin
babur khan18-Dec-04 22:03
babur khan18-Dec-04 22:03 

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.