🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4731

Re: Get CD-DVD drive name

#4731
From: Stefano Bonifazi
Date: Thu, 15 Dec 2005 08:01
45 lines
2746 bytes
Hi Mr. Lebeau, thank You as always for Your answer ...
 I would like to follow the DeviceIoControl()  way ... Really I searched 
already its ducumentation before asking for help, but in my BCB SDK there's 
nothing about SCSI!! And in fact when compiling, it can't find 
IOCTL_SCSI_GET_INQUIRY_DATA and the other structs ... I copied the example 
You suggested, but I have no such headers in my hdisk :-(
Reading MSDN it sounds I need Windows DDK, but they want something like 200$ 
!!! And I need only 2 headers!!!
Could You kindly suggest me where to download them from?
Thank You very much!!!
Best Regards,
Stefano B.

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> ha scritto nel messaggio 
news:43a07b4c$1@newsgroups.borland.com...
>
> "Stefano Bonifazi" <stefboombastic@libero.it> wrote in message
> news:43a073aa@newsgroups.borland.com...
>
>>  Given a drive path (example "d:\\" or "e:\\") how can i get the
>> CD-DVD drive name (example "Plextor PX 716-A" or
>> "Toshiba DVD-ROM SD...")??
>
> You have to query the hardware device directly for that.
>
> If you are using NT/2K/XP, you can use DeviceIoControl() to send an
> IOCTL_SCSI_GET_INQUIRY_DATA command to the device.  The return value is a
> SCSI_ADAPTER_BUS_INFO structure which then contains a SCSI_INQUIRY_DATA
> structure, which will contain the device name.  For example:
>
>
> http://groups.google.com/group/microsoft.public.win32.programmer.mmedia/msg/399670392db558c2?dmode=source
>
> Alternatively, you can use WMI to query the device.  You can run a query 
> on
> the "Win32_CDROMDrive" class to retreive various information about the
> available devices.  Or you can use the TWmiStorageInfo component to do the
> work for you:
>
>    http://www.online-admin.com/wmiset.html#TWmiStorageInfo
>
>
> Gambit
>
> 
Technical Details
Message-ID: <43a122a0@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <43a073aa@newsgroups.borland.com> <43a07b4c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,882de3d541e3a07d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Stefano Bonifazi" <stefboombastic@libero.it>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <43a073aa@newsgroups.borland.com> <43a07b4c$1@newsgroups.borland.com>
Subject: Re: Get CD-DVD drive name 
Date: Thu, 15 Dec 2005 09:01:47 +0100
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 151.28.101.187
Message-ID: <43a122a0@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1134633632 151.28.101.187 (15 Dec 2005 00:00:32 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail