Computer ForumsComputers  

Go Back   Computer Forums > Programmers Lounge > Programming Discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 06-05-2006, 03:03 AM   #1 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 20
Default warning users about USB drives?

hi,
Is there a way of alerting the user that they have left there memory stick/keydrive in the computer when they log off there computer, we use novell login system,
if it is posible what language is best to write it in
thanks in advance
hargi22 is offline   Reply With Quote
Old 06-05-2006, 04:33 PM   #2 (permalink)
Dope Tech
 
Join Date: Jan 2004
Posts: 3,589
Send a message via ICQ to office politics Send a message via AIM to office politics Send a message via Yahoo to office politics
Default

i believe SP_DEVICE_INTERFACE_DATA will be able to detect usb devices

visual c++
http://www.codeguru.com/forum/archiv.../t-273081.html
Code:
the code about usb
// find usb device
SP_DEVICE_INTERFACE_DATA strtInterfaceData;
BOOL bSuccess = SetupDiEnumDeviceInterfaces(hDevInfo,NULL,&guidHID,0,
&strtInterfaceData);
if (!bSuccess)
{
m_strLog += _T("sorry,cant find usb device");
SetupDiDestroyDeviceInfoList(hDevInfo);
return;
}

//if there is usb device,then read it's directory
SP_DEVICE_INTERFACE_DETAIL_DATA strtDetailData;
if (!SetupDiGetDeviceInterfaceDetail(hDevInfo,&strtInterfaceData,
&strtDetailData,sizeof(strtDetailData),NULL,NULL))
{
AfxMessageBox(_T("error when get usb's directory"));
SetupDiDestroyDeviceInfoList(hDevInfo);
return;
}

__________
http://www.codecomments.com/message577741.html

__________
http://www.alanmacek.com/usb/usb.c
__________________
Tech IMO.com | ExtremeTech.com | ASP Free.com | SysOpt.com | Tech Support Guy.org
DB Forums.com | Cyber Tech Help.com | Lazy Forums.com | Warrior Nation.net

'If you don't stand for somethin you'll fall for anything' - Dr. Dre Been there, done that
office politics is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:25 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0