Hello everybody,
This is my second question and same question...
I am trying to know USB mass storage was removed by safety or force as below
When mass storage was removed, it will be by safety remove function or forced remove(just pull out)
I would like to display message box.
If they just pull out mass storage. nest time when they pulg mass storage, message box will pop up as below.
"Last time, you just pulled out mass storage without safety remove function. to protect data please use safety remove"
LRESULT CMainFrame::OnDeviceChange(WPARAM wParam, LPARAM lParam)
{
DEV_BROADCAST_HDR *pStructure;
switch(wParam)
{
case DBT_DEVICEARRIVAL:
break;
case DBT_DEVICEREMOVECOMPLETE:
pStructure = (DEV_BROADCAST_HDR *)lParam;
/////////////////////////////////////////
//I have to do .....//
/////////////////////////////////////////
break;
}
But I can't progress any more.
Any clue is heplful.
Please help me.
Thank you.
This is my second question and same question...
I am trying to know USB mass storage was removed by safety or force as below
When mass storage was removed, it will be by safety remove function or forced remove(just pull out)
I would like to display message box.
If they just pull out mass storage. nest time when they pulg mass storage, message box will pop up as below.
"Last time, you just pulled out mass storage without safety remove function. to protect data please use safety remove"
LRESULT CMainFrame::OnDeviceChange(WPARAM wParam, LPARAM lParam)
{
DEV_BROADCAST_HDR *pStructure;
switch(wParam)
{
case DBT_DEVICEARRIVAL:
break;
case DBT_DEVICEREMOVECOMPLETE:
pStructure = (DEV_BROADCAST_HDR *)lParam;
/////////////////////////////////////////
//I have to do .....//
/////////////////////////////////////////
break;
}
But I can't progress any more.
Any clue is heplful.
Please help me.
Thank you.