RegisterDeviceNotification in service
From: wei (wei_chen55_at_comcast.net)
Date: 05/28/04
- Next message: DL: "Re: cannot find msconfig"
- Previous message: Dustin: "Integrated Backup - Problem with deleted schedules"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 28 May 2004 11:07:52 -0400
Hello,
I am trying to get my service program notified with new volume arrival
event.
But the RegisterDeviceNotification keep failing me with error code 13 which
is
invalid_data.
Following is my code, can anyone point me where i did wrong?
Thank you very much.
DEV_BROADCAST_VOLUME NotificationFilter;
ZeroMemory(&NotificationFilter,sizeof(DEV_BROADCAST_VOLUME));
NotificationFilter.dbcv_size = sizeof(DEV_BROADCAST_VOLUME);
NotificationFilter.dbcv_devicetype = DBT_DEVTYP_VOLUME;
//No use to tweak the dbcv)unitmask and dbcv_flags
//NotificationFilter.dbcv_unitmask = 0x0215;
//NotificationFilter.dbcv_flags = DBTF_MEDIA;
NotifyHandle =
RegisterDeviceNotification(m_hServiceStatus,&NotificationFilter,DEVICE_NOTIF
Y_SERVICE_HANDLE);
- Next message: DL: "Re: cannot find msconfig"
- Previous message: Dustin: "Integrated Backup - Problem with deleted schedules"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|