How to convert char* to TCHAR? [duplicate]

<>

This question already has an answer here:

Answers


If you include the header file:

#include "atlstr.h"

Then you can use the A2T macro as below:

// You'd need this line if using earlier versions of ATL/Visual Studio
// USES_CONVERSION;

char*  stheParameterFileName = argv[1];
TCHAR szName [512];
_tcscpy(szName, A2T(stheParameterFileName));
MessageBox(NULL, szName, szName, MB_OK);

Details on MSDN


Need Your Help

How to concisely assign and immediately invoke a function variable?

javascript function jslint iife

The following is a method for defining an anonymous function within a closure, invoke the function, and forget it:

How to open website url from windows application(.net) (no javascript)

asp.net windows

I want to open website url(in default browser) from my windows application.

Regex - Match an end html tag if start tag is not present

c# .net regex

i want to get an ending html tag like &lt;/EM&gt; only if somewhere before it i.e. before any previous tags or text there is no starting &lt;EM&gt; tag my sample string is

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.