USB HOST DRIVER V03 Freescale Semiconductor / Motorola, USB HOST DRIVER V03 Datasheet - Page 22

no-image

USB HOST DRIVER V03

Manufacturer Part Number
USB HOST DRIVER V03
Description
USB Host Driver v03
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
file in the Microsoft SDK. In order to use notifications, the Client application should
register the automatic
notified by a window handle. The notification transforms to a WM_DEVICECHANGE
window message, where the lParam parameter points to the buffer with
DEV_BROADCAST_DEVICEINTERFACE structure, from which the Client application
can extract the required fields concerning notification.
To be notified about Device attachment or removing events, the caller must specify the
MOTUSB Interface ID to the
Example:
#include <dbt.h>
……………
HDEVINFO RegisterDevNotify(HWND hWnd)
{
}
NOTE: This sample requires the Microsoft SDK for Windows 2000 to be installed.
However the developer can use libraries and headers provided with Microsoft Visual C++
6.0. In this case the “/DWINVER=0x0500” C compiler directive should be specified.
The Client application should use the
function when it no longer needs notification.
For further information about notifications, refer to the Microsoft Windows 2000 SDK.
M
HDEVINFO
DEV_BROADCAST_DEVICEINTERFACE filter;
if (!hWnd)
ZeroMemory(&filter, sizeof(filter) );
filter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
filter.dbcc_Devicetype = DBT_DEVTYP_DEVICEINTERFACE;
filter.dbcc_classguid = g_GuidMotUSB;
hDevNotify = RegisterDeviceNotification(
return hDevNotify;
return NULL;
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
RegisterDeviceNotification
);
hWnd,
&filter,
DEVICE_NOTIFY_WINDOW_HANDLE
RegisterDeviceNotification
Driver Model.
UnregisterDeviceNotification
hDevNotify;
API function. The caller can be
function.
Win32 API
2-11

Related parts for USB HOST DRIVER V03