Hola todos:
Disculpad mi ignorancia respecto de esta rutina, pues la he
probado y me da un numero de serie -864969949.
Es correcto que de un valor negativo?.
Mi duda es que tengo un numero serial, que no se corresponde
con el resultado de la rutina. (No puedo asegurarte absolutamente
que sea correcto pero lo anote de algun programa probando FW ???).
Luego pido disco d: (que es una particion del anterior) y me da
2862025.
Me podeis aclarar un poco.
Gracias anticipadas.
Josep Castells
"Ramón Zea" <
zeasoftware@hotmail.com> escribió en el mensaje
news:[email=
46e55c9a@ozsrv2.ozlan.local...]
46e55c9a@ozsrv2.ozlan.local...[/email]
> El #serial del HD.
>
> Saludos
> --
> Ramón Zea
> 01.993.194.14.27
>
http://www.paginasprodigy.com/zeasoftware/
>
zeasoftware@prodigy.net.mx
>
zeasoftware@hotmail.com
>
ramonzea@yahoo.com
>
zeasoft.movil@hotmail.com
> "Paco V" <
ssi@ono.com> escribió en el mensaje
> news:46e529cb$[email=
1@ozsrv2.ozlan.local...]
1@ozsrv2.ozlan.local...[/email]
> >
> > Ramon:
> > El número que devuelve esta función que es?
> >
> > Paco V
> >
> >
> > =?iso-8859-1?Q?Ram=F3n_Zea?= <
zeasoftware@hotmail.com> wrote:
> >>
> >>
> >>No recuerdo quien lo puso en el foro, pero a mi me funciona perfecto.
> >>
> >>#include "Xailer.ch"
> >>
>
>> //---------------------------------------------------------- -------------=
> >>-------
> >>Function SerialHD()
> >> Local cSerial
> >>
> >> cSerial :=3D GetVolumeSerial( "C:" )
> >>
> >> Return ( cSerial )
> >>
>
>> //---------------------------------------------------------- -------------=
> >>-------
> >>
> >>#pragma BEGINDUMP
> >>#include <windows.h>
> >>#include <xailer.h>
> >>
> >>XA_FUNC( GETVOLUMESERIAL )
> >>{
> >> DWORD nSerial =3D 0;
> >>
> >> GetVolumeInformation( hb_parc( 1 ), NULL, 0, &nSerial, NULL, NULL, =
> >>NULL, 0 );
> >> hb_retnl( nSerial );
> >>}
> >>
> >>XA_FUNC( GETDISKFREESPACE )
> >>{
> >> DWORD lpSectorsPerCluster; // address of sectors per cluster
> >> DWORD lpBytesPerSector; // address of bytes per sector
> >> DWORD lpNumberOfFreeClusters; // address of number of free clusters
> >> DWORD lpTotalNumberOfClusters; // address of total number of =
> >>clusters
> >>
> >> hb_retl( GetDiskFreeSpace( hb_parc( 1 ),
> >> &lpSectorsPerCluster,
> >> &lpBytesPerSector,
> >> &lpNumberOfFreeClusters,
> >> &lpTotalNumberOfClusters ) );
> >> hb_stornl( lpSectorsPerCluster, 2 );
> >> hb_stornl( lpBytesPerSector, 3 );
> >> hb_stornl( lpNumberOfFreeClusters, 4 );
> >> hb_stornl( lpTotalNumberOfClusters, 5 );
> >>}
> >>
> >>#pragma ENDDUMP
> >>
>
>> //---------------------------------------------------------- -------------=
> >>-------
> >>
> >>Saludos
> >>--=20
> >>Ram=F3n Zea
> >>01.993.194.14.27
> >>
http://www.paginasprodigy.com/zeasoftware/
> >>
zeasoftware@prodigy.net.mx
> >>
zeasoftware@hotmail.com
> >>
ramonzea@yahoo.com
> >>
zeasoft.movil@hotmail.com
> >>"PILO" <
srmpilo@hotmail.com> escribi=F3 en el mensaje =
> >>news:[email=
46e42d7c@ozsrv2.ozlan.local...]
46e42d7c@ozsrv2.ozlan.local...[/email]
> >>> Alguien me puede decir como leer el numero de serie del disco duro
> >>> y de la direccion mac de la tarjeta de red
> >>>=20
> >>>
> >>
> >><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> >><HTML><HEAD>
> >><META http-equiv=3DContent-Type content=3D"text/html; =
> >>charset=3Diso-8859-1">
> >><META content=3D"MSHTML 6.00.2900.3157" name=3DGENERATOR>
> >><STYLE></STYLE>
> >></HEAD>
> >><BODY>
> >><DIV><FONT face=3DArial size=3D2>No recuerdo quien lo puso en el foro, =
> >>pero a mi me=20
> >>funciona perfecto.</FONT></DIV>
> >><DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
> >>size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2>#include =
> >>"Xailer.ch"</FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff=20
>
>>size=3D2> //---------------------------------------------------------- ----=
> >>----------------<BR>Function=20
> >>SerialHD()<BR> Local cSerial</FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2> =
> >>cSerial :=3D=20
> >>GetVolumeSerial( "C:" )<BR></FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2> Return ( cSerial =
> >>)</FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff=20
>
>>size=3D2> //---------------------------------------------------------- ----=
> >>----------------</FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2>#pragma =
> >>BEGINDUMP<BR>#include=20
> >><windows.h><BR>#include <xailer.h></FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2>XA_FUNC( =
> >>GETVOLUMESERIAL=20
> >>)<BR>{<BR> DWORD nSerial =3D 0;</FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2> =20
> >>GetVolumeInformation( hb_parc( 1 ), NULL, 0, &nSerial, NULL, NULL, =
> >>NULL, 0=20
> >>);<BR> hb_retnl( nSerial );<BR>}</FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2>XA_FUNC( =
> >>GETDISKFREESPACE=20
> >>)<BR>{<BR> DWORD lpSectorsPerCluster; // address =
> >>of=20
> >>sectors per cluster<BR> DWORD lpBytesPerSector; =
> >>//=20
> >>address of bytes per sector<BR> DWORD=20
> >>lpNumberOfFreeClusters; // address of number of free=20
> >>clusters<BR> DWORD lpTotalNumberOfClusters; // =
> >>address=20
> >>of total number of clusters</FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff =
> >>size=3D2> hb_retl(=20
> >>GetDiskFreeSpace( hb_parc( 1=20
> >>),<BR> &=
> >>nbsp;=20
> >>&lpSectorsPerCluster,<BR> &n=
> >>bsp; =20
> >>&lpBytesPerSector,<BR> =
> >>; =20
> >>&lpNumberOfFreeClusters,<BR> =
> >>; =20
> >>&lpTotalNumberOfClusters ) );<BR> hb_stornl( =
> >>
> >>lpSectorsPerCluster, 2 );<BR> hb_stornl(=20
> >>lpBytesPerSector, 3 );<BR> hb_stornl(=20
> >>lpNumberOfFreeClusters, 4 );<BR> hb_stornl(=20
> >>lpTotalNumberOfClusters, 5 );<BR>}</FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2>#pragma =
> >>ENDDUMP</FONT></DIV>
> >><DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
> >><DIV><FONT face=3DArial size=3D2><FONT=20
>
>>color=3D#0000ff>//-------------------------------------------------------=
> >>-----------------------<BR><BR></FONT>Saludos</FONT></DIV >
> >><DIV><FONT face=3DArial size=3D2>-- <BR>Ram=F3n =
> >>Zea<BR>01.993.194.14.27<BR></FONT><A=20
> >>href=3D"
http://www.paginasprodigy.com/zeasoftware/"><FONT
face=3DArial=20
> >>size=3D2>
http://www.paginasprodigy.com/zeasoftwa ... ><BR><A=20
> >>href=3D"mailto:
zeasoftware@prodigy.net.mx"><FONT face=3DArial=20
> >>size=3D2>
zeasoftware@prodigy.net.mx</FONT></A><BR><A=20
> >>href=3D"mailto:
zeasoftware@hotmail.com"><FONT face=3DArial=20
> >>size=3D2>
zeasoftware@hotmail.com</FONT></A><BR><A=20
> >>href=3D"mailto:
ramonzea@yahoo.com"><FONT face=3DArial=20
> >>size=3D2>
ramonzea@yahoo.com</FONT></A><BR><A=20
> >>href=3D"mailto:
zeasoft.movil@hotmail.com"><FONT face=3DArial=20
> >>size=3D2>
zeasoft.movil@hotmail.com</FONT></A></DIV>
> >><DIV><FONT face=3DArial size=3D2>"PILO" <</FONT><A=20
> >>href=3D"mailto:
srmpilo@hotmail.com"><FONT face=3DArial=20
> >>size=3D2>
srmpilo@hotmail.com</FONT></A><FONT face=3DArial size=3D2>> =
> >>escribi=F3 en el=20
> >>mensaje </FONT><A href=3D"news:
46e42d7c@ozsrv2.ozlan.local"><FONT =
> >>face=3DArial=20
> >>size=3D2>news:
46e42d7c@ozsrv2.ozlan.local</FONT></A><FONT
face=3DArial=20
> >>size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> Alguien me =
> >>puede decir como=20
> >>leer el numero de serie del disco duro<BR>> y de la direccion mac de =
> >>la=20
> >>tarjeta de red<BR>> <BR>></FONT></BODY></HTML>
> >>
> >>
> >
>
>
>