Guest Vasya Posted September 7, 2008 Posted September 7, 2008 Hello, I need to be able to detect programaticallly from a Windows application the appearance of a new drive letter, e.g. z, y, etc. Ideally I would like to use an event driven approach. Is there a function in the Win32 API that will allow me to register a callback function that will be called when driver letters appear(are assigned by the Windows executive)? Thank you, Bill
Guest Uwe Sieber Posted September 8, 2008 Posted September 8, 2008 Re: a critical Win32 API question! Vasya wrote: > Hello, > > I need to be able to detect programaticallly from a Windows > application the appearance of a new drive letter, e.g. z, y, etc. > Ideally I would like to use an event driven approach. Is there a > function in the Win32 API that will allow me to register a callback > function that will be called when driver letters appear(are assigned > by the Windows executive)? All toplevel windows get an WM_DEVICE_CHANGE with wParam==DBT_DEVICEARRIVAL, see here: http://support.microsoft.com/kb/163503 This describes CD media insertion and removal but is identical to whole drive arrivals and removals (apart from the DBTF_MEDIA flag). Better ask such questions in a programmers group as microsoft.public.win32.programmer. Uwe
Recommended Posts