[Qt-interest] winEvent
OS Prog
osprog at gmail.com
Sat Jul 4 19:13:02 CEST 2009
Hi,
I try to find the attached USB PID and VID.
bool MainWindow::winEvent ( MSG * message, long * result )
{
PDEV_BROADCAST_DEVICEINTERFACE pdbd;
if (WM_DEVICECHANGE == message->message)
{
switch(message->wParam)
{
case DBT_DEVICEARRIVAL:
qDebug("DBT_DEVICEARRIVAL");
qDebug("lParam:%08X", message->lParam);
if(message->lParam)
{
pdbd = (PDEV_BROADCAST_DEVICEINTERFACE)message->lParam;
qDebug("%s", qPrintable(QString::fromUtf16((ushort*)(pdbd->dbcc_name))));
}
break;
<snip>
When I attach an USB Flash drive, I get only '?"' for dbcc_name. I expect
some string with PID and VID inside.
What I'm doing wrong?
It's Qt4.5 on Vista.
Regards,
Nikolay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090704/7095c533/attachment.html
More information about the Qt-interest-old
mailing list