Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

USB Storage remove problem.

Status
Not open for further replies.

tntnypapa

Programmer
Jun 16, 2005
2
KR
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top