API for the hard disk label and serial number

API for the hard disk label and serial number

Post by Stewart F. Put » Wed, 15 May 1996 04:00:00




> Hi navigators!!

> Can you tell me which is the Windows API to see the label and the serial


Declare Function GetVolumeInformation Lib "kernel32" _
    Alias "GetVolumeInformationA" ( _
    ByVal lpRootPathName As String, _
    ByVal lpVolumeNameBuffer As String, _
    ByVal nVolumeNameSize As Long, _
    lpVolumeSerialNumber As Long, _
    lpMaximumComponentLength As Long, _
    lpFileSystemFlags As Long, _
    ByVal lpFileSystemNameBuffer As String, _
    ByVal nFileSystemNameSize As Long) As Long

SFP

 
 
 

API for the hard disk label and serial number

Post by Richard Trah » Thu, 16 May 1996 04:00:00



>Hi navigators!!

>Can you tell me which is the Windows API to see the label and the
serial


The API is GetVolumeInformation (GetVolumeInformationA for 32-bit
calls). However, Visual Basic (and VBA) does not interface correctly
with this function, so I have written a dll in Visual C++ designed to
be called from VB and VBA code that returns the disk serial number (I
don't return the label because I don't use it, but the dll can be
easily modified to do this). In other words, VB/VBA calls my dll which
calls the API, etc., and returns the data correctly. If you (or anyone
else) would like a copy of the source code, or of the binary if you
don't have a VCPP compiler, send me e-mail and I'll be glad to give it
to you.

 
 
 

API for the hard disk label and serial number

Post by Pedro Maic » Thu, 16 May 1996 04:00:00



>Hi navigators!!
>Can you tell me which is the Windows API to see the label and the serial


   Casi seguro que te has equivocado de area al poner este mensaje (lo
digo por el idioma), de todos modos creo que te puedo responder....

   No existe ninguna funcion del api para averiguar la etiqueta ni el
numero de serie de un disco. En el caso de la etiqueta, se puede usar
una llamada a la  int 21h del DOS (funcion 4Eh), y para averiguar el
numerio de serie creo que la nica solucion es leer el primer sector
del disco (con la int 13h de la bios).

Saludos :-)           -Pedro-


http://www.lander.es/~pmaicas/

 
 
 

API for the hard disk label and serial number

Post by Bjorn Lars » Sun, 19 May 1996 04:00:00




>>Hi navigators!!

>>Can you tell me which is the Windows API to see the label and the
>serial

>The API is GetVolumeInformation (GetVolumeInformationA for 32-bit
>calls). However, Visual Basic (and VBA) does not interface correctly
>with this function, so I have written a dll in Visual C++ designed to
>be called from VB and VBA code that returns the disk serial number (I
>don't return the label because I don't use it, but the dll can be
>easily modified to do this). In other words, VB/VBA calls my dll which
>calls the API, etc., and returns the data correctly. If you (or anyone
>else) would like a copy of the source code, or of the binary if you
>don't have a VCPP compiler, send me e-mail and I'll be glad to give it
>to you.

What do you mean ?? vb does not interface the function correctly ?
I have used it many times and i have no problems with getvolumeinformation
What was your problem then ??
--
 .--------------------------------------.------------------------.

`--------------------------------------'------------------------'
 
 
 

API for the hard disk label and serial number

Post by Chris Whitehea » Mon, 20 May 1996 04:00:00


Pedro, speak ENGLISH.  And by the way, you don't have to use DOS
interrupts to get this info.

On Wednesday, May 15, 1996, Pedro Maicas wrote...

> >Hi navigators!!

> >Can you tell me which is the Windows API to see the label and the
serial

>    Casi seguro que te has equivocado de area al poner este mensaje (lo
> digo por el idioma), de todos modos creo que te puedo responder....

>    No existe ninguna funcion del api para averiguar la etiqueta ni el
> numero de serie de un disco. En el caso de la etiqueta, se puede usar
> una llamada a la  int 21h del DOS (funcion 4Eh), y para averiguar el
> numerio de serie creo que la nica solucion es leer el primer sector
> del disco (con la int 13h de la bios).

> Saludos :-)           -Pedro-


> http://www.lander.es/~pmaicas/

 
 
 

API for the hard disk label and serial number

Post by David Lloyd-Jon » Mon, 20 May 1996 04:00:00



>Pedro, speak ENGLISH.  And by the way, you don't have to use DOS
>interrupts to get this info.

The appropriately named "White"head fires the shot in a personal
little war he wants to get into.

Don't worry Chris: we're all ignoring you.

                                           -dlj.

 
 
 

API for the hard disk label and serial number

Post by Chris Whitehea » Tue, 21 May 1996 04:00:00


Ah, David. There was nothing personal in the return mail.  I just happen
to find it very rude to reply using a language which may not be
comprehensible to the question's initiator.  If the language is
incomprehensible, the reply may as well be gibberish.  Are you with me so
far?  The initiator's original question was phrased in English.
Therefore, I would consider the response to be phrased in English as this
was the language used.  I haven't lost you so far, have I?  Good, we are
almost at the end of the tunnel.

Finally, the "appropriately named" Whitehead is American Indian, not
"White".  What amazes me is that we have this new form of information
exchange and something as ignorant as prejudice is introduced.  How
pathetic.

You have all my blessings.  Ignore away!!!!

On Sunday, May 19, 1996, David Lloyd-Jones wrote...

> >Pedro, speak ENGLISH.  And by the way, you don't have to use DOS
> >interrupts to get this info.

> The appropriately named "White"head fires the shot in a personal
> little war he wants to get into.

> Don't worry Chris: we're all ignoring you.

>                                            -dlj.

 
 
 

1. Hard Disk Serial Number

Hi Chris,

It ain't easy.  The most straightforward way I know of is to use the
DiskInfo custom control available from Mabry software
(http://www.mabry.com, I believe), which makes this information (along with
some other useful items) available.  My understanding is that getting this
information requires an absolute disk read, of which I am told VB is
inherently incapable.

-- C. Luc Reid
   Owner, Reid Software Development

   http://www.ariasoft.com/
   Haddonfield, NJ



2. HELP: Simple Question : Trimming trailing spaces from a string

3. Volume serial number of a hard disk

4. SQL server6.5 connect problem

5. Obtaining Hard Disk Serial Number

6. java stored procedure - how do I connect?

7. Hard disk serial number or Ethernet card serial number.

8. Memo Column Type Equivalent ?

9. MACINTOSH - Foxpro routine to grab hard disk serial #

10. Hard disk serial no.

11. How do I read the disk Serial Number

12. Disk Drive Serial Number

13. Disk Drive Serial Number?