LPTSTR in vc.net

  • Thread starter Thread starter --== Alain ==--
  • Start date Start date
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.
 
--== 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
 
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.
 
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
 
That's a completely different question: How do I convert from LPTSTR to a
..NET String?

SvenC has anwered this.

Brian
 
Back
Top