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

Managed C++/CLI

 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Nemanja Trifunovic9-Mar-06 3:50
Nemanja Trifunovic9-Mar-06 3:50 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Nish Nishant9-Mar-06 5:25
sitebuilderNish Nishant9-Mar-06 5:25 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Judah Gabriel Himango9-Mar-06 5:04
sponsorJudah Gabriel Himango9-Mar-06 5:04 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Nish Nishant9-Mar-06 5:26
sitebuilderNish Nishant9-Mar-06 5:26 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Judah Gabriel Himango9-Mar-06 5:36
sponsorJudah Gabriel Himango9-Mar-06 5:36 
GeneralRe: Compiling native C files in C++/CLI solution Pin
Judah Gabriel Himango9-Mar-06 5:00
sponsorJudah Gabriel Himango9-Mar-06 5:00 
QuestionConverting CLR String to LPCSTR Pin
Judah Gabriel Himango8-Mar-06 15:49
sponsorJudah Gabriel Himango8-Mar-06 15:49 
AnswerRe: Converting CLR String to LPCSTR Pin
Nish Nishant8-Mar-06 16:02
sitebuilderNish Nishant8-Mar-06 16:02 
Judah Himango wrote:
I've got a C++/CLI library I'm using to wrap some native C methods in order to call them easily from another .NET language.

This is probably an easy question, but how can I convert a .NET string (System::String) to a LPCSTR? I'm new the the CLI extensions for C++, and google doesn't give me anything other than the old MSDN article which refers to solutions using the old MC++ syntax.


Hello Judah,

See http://www.codeproject.com/managedcpp/StringConvertor.asp[^]

If you don't want to use the class, look at the source code to see how it's done.

Regards,
Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
The Ultimate Grid - The #1 MFC grid out there!

GeneralRe: Converting CLR String to LPCSTR Pin
Judah Gabriel Himango8-Mar-06 16:04
sponsorJudah Gabriel Himango8-Mar-06 16:04 
Questionchecking Parallel Port Pin
karanba8-Mar-06 3:39
karanba8-Mar-06 3:39 
AnswerRe: checking Parallel Port Pin
valikac8-Mar-06 11:58
valikac8-Mar-06 11:58 
QuestionHow to read a pdf file using c++ Pin
Allang Garder7-Mar-06 17:13
Allang Garder7-Mar-06 17:13 
AnswerRe: How to read a pdf file using c++ Pin
toxcct7-Mar-06 22:14
toxcct7-Mar-06 22:14 
GeneralRe: How to read a pdf file using c++ Pin
prrusa8-Mar-06 9:14
prrusa8-Mar-06 9:14 
QuestionHelp with this basic code Pin
Fu Manchu7-Mar-06 13:56
Fu Manchu7-Mar-06 13:56 
AnswerRe: Help with this basic code Pin
toxcct7-Mar-06 21:45
toxcct7-Mar-06 21:45 
AnswerRe: Help with this basic code Pin
Gavin Taylor7-Mar-06 23:39
professionalGavin Taylor7-Mar-06 23:39 
AnswerRe: Help with this basic code Pin
Fu Manchu8-Mar-06 12:01
Fu Manchu8-Mar-06 12:01 
Questionsearchable void* container Pin
Amr Shahin7-Mar-06 2:58
Amr Shahin7-Mar-06 2:58 
AnswerRe: searchable void* container Pin
toxcct7-Mar-06 3:06
toxcct7-Mar-06 3:06 
GeneralRe: searchable void* container Pin
Amr Shahin7-Mar-06 3:10
Amr Shahin7-Mar-06 3:10 
GeneralRe: searchable void* container Pin
John M. Drescher7-Mar-06 3:15
John M. Drescher7-Mar-06 3:15 
GeneralRe: searchable void* container Pin
toxcct7-Mar-06 3:16
toxcct7-Mar-06 3:16 
GeneralRe: searchable void* container Pin
John M. Drescher7-Mar-06 3:22
John M. Drescher7-Mar-06 3:22 
GeneralRe: searchable void* container Pin
John M. Drescher7-Mar-06 3:12
John M. Drescher7-Mar-06 3:12 

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.