开发者

Help on LPCWSTR

开发者 https://www.devze.com 2023-01-05 07:13 出处:网络
How can i convet QString to LPCWSTR... 开发者_StackOverflow社区 QString a = QString(\"\\\\.\\%1:\").arg( \"G\" );

How can i convet QString to LPCWSTR...

开发者_StackOverflow社区

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


You could use the toWCharArray function.

EDIT:

Here are some code snippets.

0

精彩评论

暂无评论...
验证码 换一张
取 消