LPTSTR in vc.net

A

--== Alain ==--

Hi,

How can i use LPTSTR in VC++.NET application ?
the same question for HINSTANCE, and HANDLE types.

Should i use a MarshalAs and to which type ?
thanks,

Al.
 
B

Brian Muth

--== Alain ==-- said:
Hi,

How can i use LPTSTR in VC++.NET application ?
the same question for HINSTANCE, and HANDLE types.

Just use it (them). There is nothing stopping you.

Should i use a MarshalAs and to which type ?
thanks,

What on earth for? VC++.NET can handle native types just fine.

Brian
 
A

--== Alain ==--

But it's not so easy as 1,2,3.

i tried to use
LPTSTR szTest = "Hi my namse is...";
String^ strMine="";
strMine = String::Format("{0}",(LPTSTR));

but it does not convert it :-(

Al.
 
S

SvenC

Hi Alain,

--== Alain ==-- said:
But it's not so easy as 1,2,3.

i tried to use
LPTSTR szTest = "Hi my namse is...";
String^ strMine="";
strMine = String::Format("{0}",(LPTSTR));

but it does not convert it :-(

Marshal.PtrToStringAnsi/Uni/Auto will convert your native string
 
B

Brian Muth

That's a completely different question: How do I convert from LPTSTR to a
..NET String?

SvenC has anwered this.

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top