
07/09/2002, 22:49
|
| | Fecha de Ingreso: abril-2002
Mensajes: 20
Antigüedad: 23 años Puntos: 0 | |
Re: Visual Basic: Como leer el serial del disco duro. Hola chicos, perdón la tardanza pero he estado más que ocupado y no he podido acceder al foro.
Primero que nada les agradeszco los aportes.
Voy a probar con lo que me dijo sndsdlm . En cuanto a JCL , el problema parece no ser el código que me enviaste, dado que lo búsque en varios lugares y todos tenían el mismo problema. De tanto buscar encontré una información referente al GetVolumeInformation de la Microsoft y es que viene con problemas, ya que no devuelve el número de serie sino que entrega un 0 (cero), el informe es el siguiente :
...
BUG: GetVolumeInformation Doesn"t Return Volume Serial Number of Remote Drives on Windows
The information in this article applies to:
Microsoft Win32 Application Programming Interface (API), when used with:
the operating system: Microsoft Windows 95
the operating system: Microsoft Windows 98
the operating system: Microsoft Windows Millennium Edition
Symptoms
Win32 programs use GetVolumeInformation() to retrieve information about local and remote volumes. On Microsoft Windows 95, Microsoft Windows 98, and Microsoft Windows Millennium Edition (Me) GetVolumeInformation() does not retrieve the actual serial number of remote volumes, but always returns zero for the volume serial number.
Resolution
To obtain the volume serial number of a remote volume, open a file on the remote volume and use GetFileInformationByHandle(). Part of the returned information is the serial number of the volume on which the file is located. This strategy works as long as there is a file on the remote volume that can be opened. The following sample code demonstrates how to do this:
... |