user198725878
user198725878

Reputation: 6386

Help on LPCWSTR

How can i convet QString to LPCWSTR...

QString a = QString("\\.\%1:").arg( "G" );

i have to use it for the below function

HANDLE hDevice = CreateFile ( a ,0,FILE_SHARE_READ | FILE_SHARE_WRITE, // share mode
                     // NULL, OPEN_EXISTING, 0, NULL);

Thank you

Upvotes: 2

Views: 1380

Answers (1)

the_void
the_void

Reputation: 5538

You could use the toWCharArray function.

EDIT:

Here are some code snippets.

Upvotes: 5

Related Questions