Click here to Skip to main content
15,895,811 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DeviceIoControl question Pin
Randor 1-Mar-12 8:00
professional Randor 1-Mar-12 8:00 
GeneralRe: DeviceIoControl question Pin
RomTibi1-Mar-12 9:53
RomTibi1-Mar-12 9:53 
GeneralRe: DeviceIoControl question Pin
Randor 2-Mar-12 0:39
professional Randor 2-Mar-12 0:39 
GeneralRe: DeviceIoControl question Pin
RomTibi2-Mar-12 4:25
RomTibi2-Mar-12 4:25 
GeneralRe: DeviceIoControl question Pin
Randor 2-Mar-12 18:18
professional Randor 2-Mar-12 18:18 
GeneralRe: DeviceIoControl question Pin
RomTibi5-Mar-12 8:25
RomTibi5-Mar-12 8:25 
GeneralRe: DeviceIoControl question Pin
Randor 5-Mar-12 12:38
professional Randor 5-Mar-12 12:38 
GeneralRe: DeviceIoControl question Pin
RomTibi5-Mar-12 18:14
RomTibi5-Mar-12 18:14 
In this App I use DeviceIoControl to accomplish the following tasks:
- enumerate the PhysicalDriveX devices
- determine nr. of bytes to be overwritten
- for ATA devices determine the Vendor, Product and Revision http://www.winsim.com/diskid32/diskid32.html[^] [http://www.winsim.com/diskid32/diskid32.html[^]] for the reason that the user not to erase a drive that is not intended to.

And all this via a HANDLE from CreateFile("\\\\.\\PhysicalDriveX", ...)
Everything goes OK for ATA, not for USB. In my previous post I have shown an example on how you can`t rely on

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Disk\Enum\N because USB devices are presented in the order they were attached.

So, the question is: can I obtain with a HANDLE created by
CreateFile("\\\\.\\PhysicalDriveX", ...)
data reffering to manufacturer, type, revision for a USB attached storage device?


36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.

SUN-TZU - Art of War

GeneralRe: DeviceIoControl question Pin
Randor 6-Mar-12 4:16
professional Randor 6-Mar-12 4:16 
GeneralRe: DeviceIoControl question Pin
RomTibi6-Mar-12 4:29
RomTibi6-Mar-12 4:29 
GeneralRe: DeviceIoControl question Pin
RomTibi9-Mar-12 9:19
RomTibi9-Mar-12 9:19 
QuestionRe: DeviceIoControl question Pin
Randor 9-Mar-12 11:45
professional Randor 9-Mar-12 11:45 
AnswerRe: DeviceIoControl question Pin
RomTibi10-Mar-12 9:31
RomTibi10-Mar-12 9:31 
AnswerRe: DeviceIoControl question Pin
RomTibi16-Mar-12 6:31
RomTibi16-Mar-12 6:31 
GeneralRe: DeviceIoControl question Pin
Randor 16-Mar-12 14:01
professional Randor 16-Mar-12 14:01 
GeneralRe: DeviceIoControl question Pin
RomTibi16-Mar-12 20:29
RomTibi16-Mar-12 20:29 
GeneralRe: DeviceIoControl question Pin
Randor 21-Mar-12 10:55
professional Randor 21-Mar-12 10:55 
GeneralRe: DeviceIoControl question Pin
K4HVDs22-Mar-12 6:39
K4HVDs22-Mar-12 6:39 
QuestionRe: DeviceIoControl question Pin
Randor 27-Mar-12 14:00
professional Randor 27-Mar-12 14:00 
AnswerRe: DeviceIoControl question Pin
K4HVDs27-Mar-12 17:56
K4HVDs27-Mar-12 17:56 
QuestionNeed debugger Pin
Mast Avalons28-Feb-12 5:06
Mast Avalons28-Feb-12 5:06 
AnswerRe: Need debugger Pin
Richard MacCutchan28-Feb-12 5:27
mveRichard MacCutchan28-Feb-12 5:27 
AnswerRe: Need debugger Pin
Randor 28-Feb-12 16:10
professional Randor 28-Feb-12 16:10 
AnswerRe: Need debugger Pin
SuperMegaCoder29-Feb-12 7:16
SuperMegaCoder29-Feb-12 7:16 
QuestionC program to replace all the letters of a string with all 26 alphabets..... Pin
varul27-Feb-12 5:56
varul27-Feb-12 5:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.