🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: get disk serial number

#8379
From: Andrue Cope [TeamB]
Date: Wed, 27 Oct 2004 15:05
33 lines
2300 bytes
zhan wei ming wrote:

> OK. suppose the app is provided with a PC. ... ...
> let's come back to the technics. what's wrong with
> DeviceIoControl(...) which always returns error?

Almost anything :-/

By now you've probably read my initial response. My example actually
uses a different command and I can personally vouch for it working.

Then again I can also personally vouch for spending several days with a
colleage trying all sorts of things before I got what I wanted. It's a
bit like any of the following:

  * Trying to transfer data between two PCs using a serial cable.
  * Trying to sort out Microsoft networking when it doesn't do it
itself.

DeviceIOControl() doesn't help because about all it ever returns is "No
Error" or "A parameter is incorrect". Given that at times you have over
a dozen parameters (including structure members) this seems designed to
drive you mad.

My first suggestion would be that you try my example with a SCSI device
first of all. When you have that working try it on an IDE device.
Everything you write and change should be documented on a notepad so
that you can be sure you know what you've done.

-- 
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <417fb931$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <417fa0fd@newsgroups.borland.com> <417fa38f@newsgroups.borland.com> <417fa9df@newsgroups.borland.com> <h9bvn0h2b0jkf2sh38ge4frnm6gmp92g8s@4ax.com> <417fb18e@newsgroups.borland.com> <417fb454@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bdae4482adfc73e4
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Andrue Cope [TeamB]" <no.spam@not.a.valid.address>
Subject: Re: get disk serial number
Newsgroups: borland.public.cppbuilder.nativeapi
References: <417fa0fd@newsgroups.borland.com> <417fa38f@newsgroups.borland.com> <417fa9df@newsgroups.borland.com> <h9bvn0h2b0jkf2sh38ge4frnm6gmp92g8s@4ax.com> <417fb18e@newsgroups.borland.com> <417fb454@newsgroups.borland.com>
User-Agent: XanaNews/1.16.4.6
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 217.207.223.34
Message-ID: <417fb931$1@newsgroups.borland.com>
Date: 27 Oct 2004 08:05:21 -0700
X-Trace: newsgroups.borland.com 1098889521 217.207.223.34 (27 Oct 2004 08:05:21 -0700)
Lines: 33
X-Authenticated-User: acope
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail