In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

leer numero serie disco duro

Foro de Xailer profesional en español
Responder
PILO
Mensajes: 583
Registrado: Vie Jul 06, 2007 5:18 pm

leer numero serie disco duro

Mensaje por PILO »

Alguien me puede decir como leer el numero de serie del disco duro
y de la direccion mac de la tarjeta de red
zeasoftware
Mensajes: 1831
Registrado: Mar Oct 11, 2005 9:53 am

leer numero serie disco duro

Mensaje por zeasoftware »

No recuerdo quien lo puso en el foro, pero a mi me funciona perfecto.
#include "Xailer.ch"
//---------------------------------------------------------- --------------------
Function SerialHD()
Local cSerial
cSerial := GetVolumeSerial( "C:" )
Return ( cSerial )
//---------------------------------------------------------- --------------------
#pragma BEGINDUMP
#include <windows.h>
#include <xailer.h>
XA_FUNC( GETVOLUMESERIAL )
{
DWORD nSerial = 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
--
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
"PILO" <srmpilo@hotmail.com> escribió 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
>
>
--
Paco V
Mensajes: 380
Registrado: Jue Oct 27, 2005 9:08 am

leer numero serie disco duro

Mensaje por Paco V »

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>
>
>
zeasoftware
Mensajes: 1831
Registrado: Mar Oct 11, 2005 9:53 am

leer numero serie disco duro

Mensaje por zeasoftware »

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>
>>
>>
>
PILO
Mensajes: 583
Registrado: Vie Jul 06, 2007 5:18 pm

leer numero serie disco duro

Mensaje por PILO »

Probado y funciona
Alguie tiene para leer la dirección mac de tarjetas de red
"PILO" <srmpilo@hotmail.com> escribió 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
>
>
Josep Castells
Mensajes: 74
Registrado: Jue May 24, 2007 10:43 am

leer numero serie disco duro

Mensaje por Josep Castells »

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>
> >>
> >>
> >
>
>
>
zeasoftware
Mensajes: 1831
Registrado: Mar Oct 11, 2005 9:53 am

leer numero serie disco duro

Mensaje por zeasoftware »

This is a multi-part message in MIME format.
------=_NextPart_000_002D_01C7F3DE.706C6630
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_002E_01C7F3DE.706C6630"
------=_NextPart_001_002E_01C7F3DE.706C6630
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
/*
requiere Mac.Obj
*/
/*
Function MacAddress()
LOCAL cStr :=3D ""
WITH OBJECT TMac():New()
MsgInfo( :cMac ) // Devuelve la MAC
MsgInfo( :nCount ) // Numero de tarjetas instaladas
AEval( :GetAll(), {|aMacInfo| cStr +=3D aMacInfo[1] + "--" + ;
aMacInfo[2] + "--" + ;
aMacInfo[3] + CRLF } )
MsgAlert( cStr )
END
Return ( Nil )
Te comento, nunca lo he usado.
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=46e55d6f@ozsrv2.ozlan.local...]46e55d6f@ozsrv2.ozlan.local...[/email]
> Probado y funciona
> Alguie tiene para leer la direcci=F3n mac de tarjetas de red
>=20
> "PILO" <srmpilo@hotmail.com> escribi=F3 en el mensaje=20
> 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
>=20
>
------=_NextPart_001_002E_01C7F3DE.706C6630
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!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></FONT>Â</DIV>
<DIV><FONT face=3DArial color=3D#000080 size=3D2>/*<BR>Â requiere=20
Mac.Obj</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000080 size=3D2></FONT>Â</DIV>
<DIV><FONT face=3DArial color=3D#000080 size=3D2>*/<BR>/*<BR>Function=20
MacAddress()<BR>ÂÂÂÂ LOCAL cStr :=3D ""</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000080 size=3D2></FONT>Â</DIV>
<DIV><FONT face=3DArial color=3D#000080 =
size=3D2>ÂÂÂÂÂ WITH=20
OBJECT TMac():New()<BR>ÂÂÂÂÂ MsgInfo( :cMac ) =
//=20
Devuelve la MAC<BR>ÂÂ MsgInfo( :nCount ) // Numero de tarjetas =
instaladas</FONT></DIV>
<DIV><FONT face=3DArial color=3D#000080 size=3D2></FONT>Â</DIV>
<DIV><FONT face=3DArial color=3D#000080=20
size=3D2> ÂÂÂÂÂÂ ÂÂ AEval( =
:GetAll(),=20
{|aMacInfo| cStr +=3D aMacInfo[1] + "--" +=20
;<BR> ÂÂÂÂÂÂ ÂÂÂÂÂ&n=
bsp;ÂÂÂÂÂ&n bsp;ÂÂÂÂÂ&n b=
sp;ÂÂÂÂÂ&nb sp;ÂÂÂÂÂ=20
aMacInfo[2] + "--" +=20
;<BR> ÂÂÂÂÂÂ ÂÂÂÂÂ&n=
bsp;ÂÂÂÂÂ&n bsp;ÂÂÂÂÂ&n b=
sp;ÂÂÂÂÂ&nb sp;ÂÂÂÂÂ=20
aMacInfo[3] + CRLF } =
)<BR> ÂÂÂÂÂÂ ÂÂ=20
MsgAlert( cStr )<BR>ÂÂÂÂÂ END<BR>Return ( Nil=20
)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>Â</DIV>
<DIV><FONT face=3DArial size=3D2>Te comento, nunca lo he =
usado.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>Â</DIV>
<DIV><FONT face=3DArial size=3D2>Saludos.<BR>-- <BR>Ram=F3n=20
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:46e55d6f@ozsrv2.ozlan.local"><FONT =
face=3DArial=20
size=3D2>news:46e55d6f@ozsrv2.ozlan.local</FONT></A><FONT face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> Probado y =
funciona<BR>>=20
Alguie tiene para leer la direcci=F3n mac de tarjetas de red<BR>> =
<BR>>=20
"PILO" <</FONT><A 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 <BR>> </FONT><A =
href=3D"news:46e42d7c@ozsrv2.ozlan.local"><FONT=20
face=3DArial size=3D2>news:46e42d7c@ozsrv2.ozlan.local</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>>> Alguien me puede decir como leer el numero de =
serie del=20
disco duro<BR>>> y de la direccion mac de la tarjeta de=20
red<BR>>><BR>>> <BR>> <BR>></FONT></BODY></HTML>
------=_NextPart_001_002E_01C7F3DE.706C6630--
------=_NextPart_000_002D_01C7F3DE.706C6630
Content-Type: application/octet-stream;
name="- Mac.ZIP"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="- Mac.ZIP"
UEsDBBQAAAAIAKMDxjQD4lusNQYAACALAAAHAAAATWFjLm9iapVWXWwbVRY+ Mx7/JY6dv9J2N6sN
kisClSKXpGolWG2diWkMiT3xjG8SWhic2IljJo7ln24irVbNpq5CTFaRGtqA VBEgtihPIIF44CWl
gbYSSJAHhFQeijShrcpDERLNAyic6xk7jsmutCPdOed83zn3nHPn596zZjD2 hUbaR2BuHwA0dE0m
lVA83MofPtx6tP1o+xGYswPc1Z3eNnzeCXMGgHtw8TgYZckzKHG8v9uDerdb cnP0Zuo+GfAHBU7u
EkUDDpPs9Xkl2ULvlIdlM1y5wTIsFLVBjjNqGoDZUtS8JrDWALxhAtO2YZuF V8cZh9zTJT8T9MmD
br7XLYrQVAJkme8VZcEdcPdBwy7Q6xOlSj9/17M9brFPPAmNJRCFuxgqgr2E Cbw/6JN2fCTe3yf4
fR7EmuXosHxmQkhOjkRSKXF6YnhSSUGdhnqmIiOZdASLQDOVDo28LEaUUW86 MgGOk5G0OxxKpCPJ
lDc+OgkWOZVIjsfTo2DDjmT/cEyMxMM81NPYcQxxJ5OhaV/kH2ClyNRYMjQM tSWS4jZqhKiXOxzW
LEoJmTQPjpIViCiRUCqiTzKajESwzTKXziTjWPxOfl8vwGITAGMr997n5lug Gh1EtJOijyL6p0pU
PumhIe7u7oBHFMPoM1cL8GYmMx5uV8aHq6yVL1gGIGaOmjgUzVF0x1cNr9n1 +ndOIHUtBm9RKUS7
mTJlu7a4WMbv/Bf8iGEXLpKZdeW37e0ilHtwnXOexddv4bSTkxa6nRahiGfX MiMdG/MXXscZAh03
53PLqPR3rM3PXqJzUupiiXqtRC0V09mxgYUl5wpOGtDTti686jyHdn+0DUlS KuZ+U7QT7Wh7JTiz
voSeL566JpKB4Mx6FCuNaeUP5e5igZygm9m1tHV2a9KRNWPanOTktGxDr3DO hV4n15+jvrqnI/st
bbbFmb3lOPclquUpH+habot2QNsdKnZH++24GUAwRzvu2OjHVmdpz8L8Bdpx YD5H++2PHqX9nnOu
YtVCud8l5xztf0AHLEKpP8vCc5b+veBZG517D4YES5pGDhG99D9jM9mO7e3t XLNT7z24S8ysL2MR
L8i4mIv0uQ/MrP9z58F33JJ2VtKIK5lx5TinoE++JQ2UXoTGTxgacP2+gc99 mqvPbmQe6pWIUf/u
R0cfMk0Hlz8D1SCxao3ErjqIRd2P+l9xHEL7CWJVj6H+N9S7UPejHkT9eWJd nSA1q1lSq66j/TWx
qd+jvEPq1J/Q5xfUfyV1+YPEnm8jtfm/E0c+gFJB+wyp3/xQYvNXiS2/QRrz 35GG/D2UP5OGgoE0
FupQ7sfRSpoKj+F4ijQXusi+ghf1UVJTSJLawjniKPwH5Xuk+YcPJLbwMXkE VjgOWzqGX5ARJf38
6fU02ldh5zqBNlNh91TZUpX/qSp7uMpfqbKnqvz/XcUvVNlLVf6rlMf6O3X7 ShX/kR4f1u0bun2a
1exvqvxv67xNT/pjVf6HaB9A2VuB1bHb6Sb4F/7lxhgIW1rGXAwobNgGMaOE Gyr2HI4ZB6lmYxJs
gAEXRz0T4HUZNeWSYgqXdBsjMIo5LDOxGm98PM0roVQKbGxLq8sCMqNYcd4E 4z3YUB1Sg8S0o6XJ
VUvBkicbN8tM3FxRIosl/sXO7NQ4WKqxVuInJxKT8Ug8rVXKFiOyVnDV0biY cYS6xrBJmbUqdnsY
r0SN9zyj8+Y4P5nB4Oki7yjzBle9xtMNUlFAabCjQ4Lz0unPm3TWiqwWj6Ea f96sc3bkMDdugknc
kgFzaw50JdnSSrIVK8n+/yvJ7rWSbPVKZpqABTPd/sDnGYDSQaXyfMIHPG7J Az0VTPGQUnk2occk
ja84nOhnEt6P3oEgL/kDvLu3F+iWC7jZCgG/4AlIQ/DHPbgMaTMg2ueRevzd ZZzOU3HEaSue1kQ8
pl1+BVTAX5BFYtR6lK042gijulAeJ6x6AqWA4yUcUWJQEyinCKeeRbmIY5kY 1RWU7xKT+j7KNRw3
cK6vUN7GcRf1Byi3JGYT82xijs0DqGOezTZi3sQ8m8fRxjywchrXlpO8vPg4 0JNoIjkGh1xPDu41
AJ4pvo3a/X+56S8lwEoNcOVfwWUjqKzEQI7+CH4HUEsBAhkAFAAAAAgAowPG NAPiW6w1BgAAIAsA
AAcAAAAAAAAAAAAgAAAAAAAAAE1hYy5vYmpQSwUGAAAAAAEAAQA1AAAAWgYA AAAA
------=_NextPart_000_002D_01C7F3DE.706C6630--

Attached files - Mac.ZIP (1.7 KB)Â
PILO
Mensajes: 583
Registrado: Vie Jul 06, 2007 5:18 pm

leer numero serie disco duro

Mensaje por PILO »

al Compilarlo me da este error
Enlazando CLAVES.exe...
C:Bcc55Binilink32 -Gn -Tpe -s -aa @make.tmp
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'GetAdaptersInfo' referenced from C:XAILEROBJEXTRAMAC.OBJ
77 Warnings, 1 Errors
"Ramón Zea" <zeasoftware@hotmail.com> escribió en el mensaje news:[email=46e5dd51@ozsrv2.ozlan.local...]46e5dd51@ozsrv2.ozlan.local...[/email]
/*
requiere Mac.Obj
*/
/*
Function MacAddress()
LOCAL cStr := ""
WITH OBJECT TMac():New()
MsgInfo( :cMac ) // Devuelve la MAC
MsgInfo( :nCount ) // Numero de tarjetas instaladas
AEval( :GetAll(), {|aMacInfo| cStr += aMacInfo[1] + "--" + ;
aMacInfo[2] + "--" + ;
aMacInfo[3] + CRLF } )
MsgAlert( cStr )
END
Return ( Nil )
Te comento, nunca lo he usado.
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
"PILO" <srmpilo@hotmail.com> escribió en el mensaje news:[email=46e55d6f@ozsrv2.ozlan.local...]46e55d6f@ozsrv2.ozlan.local...[/email]
> Probado y funciona
> Alguie tiene para leer la dirección mac de tarjetas de red
>
> "PILO" <srmpilo@hotmail.com> escribió 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
>>
>>
>
>
--
PILO
Mensajes: 583
Registrado: Vie Jul 06, 2007 5:18 pm

leer numero serie disco duro

Mensaje por PILO »

Ramón vistes el error, me puede decir algo
"PILO" <srmpilo@hotmail.com> escribió en el mensaje news:[email=46e6a252@ozsrv2.ozlan.local...]46e6a252@ozsrv2.ozlan.local...[/email]
al Compilarlo me da este error
Enlazando CLAVES.exe...
C:Bcc55Binilink32 -Gn -Tpe -s -aa @make.tmp
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'GetAdaptersInfo' referenced from C:XAILEROBJEXTRAMAC.OBJ
77 Warnings, 1 Errors
"Ramón Zea" <zeasoftware@hotmail.com> escribió en el mensaje news:[email=46e5dd51@ozsrv2.ozlan.local...]46e5dd51@ozsrv2.ozlan.local...[/email]
/*
requiere Mac.Obj
*/
/*
Function MacAddress()
LOCAL cStr := ""
WITH OBJECT TMac():New()
MsgInfo( :cMac ) // Devuelve la MAC
MsgInfo( :nCount ) // Numero de tarjetas instaladas
AEval( :GetAll(), {|aMacInfo| cStr += aMacInfo[1] + "--" + ;
aMacInfo[2] + "--" + ;
aMacInfo[3] + CRLF } )
MsgAlert( cStr )
END
Return ( Nil )
Te comento, nunca lo he usado.
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
"PILO" <srmpilo@hotmail.com> escribió en el mensaje news:[email=46e55d6f@ozsrv2.ozlan.local...]46e55d6f@ozsrv2.ozlan.local...[/email]
> Probado y funciona
> Alguie tiene para leer la dirección mac de tarjetas de red
>
> "PILO" <srmpilo@hotmail.com> escribió 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
>>
>>
>
>
--
zeasoftware
Mensajes: 1831
Registrado: Mar Oct 11, 2005 9:53 am

leer numero serie disco duro

Mensaje por zeasoftware »

si, pero te digo qu nunca lo use, dame unos dias para hacer pruebas y te respondo aqui mismo.
si tu le encuentras igual hazme saber, para igual hacer la correccion.
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
"PILO" <srmpilo@hotmail.com> escribió en el mensaje news:[email=46e7fd80@ozsrv2.ozlan.local...]46e7fd80@ozsrv2.ozlan.local...[/email]
Ramón vistes el error, me puede decir algo
"PILO" <srmpilo@hotmail.com> escribió en el mensaje news:[email=46e6a252@ozsrv2.ozlan.local...]46e6a252@ozsrv2.ozlan.local...[/email]
al Compilarlo me da este error
Enlazando CLAVES.exe...
C:Bcc55Binilink32 -Gn -Tpe -s -aa @make.tmp
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'GetAdaptersInfo' referenced from C:XAILEROBJEXTRAMAC.OBJ
77 Warnings, 1 Errors
"Ramón Zea" <zeasoftware@hotmail.com> escribió en el mensaje news:[email=46e5dd51@ozsrv2.ozlan.local...]46e5dd51@ozsrv2.ozlan.local...[/email]
/*
requiere Mac.Obj
*/
/*
Function MacAddress()
LOCAL cStr := ""
WITH OBJECT TMac():New()
MsgInfo( :cMac ) // Devuelve la MAC
MsgInfo( :nCount ) // Numero de tarjetas instaladas
AEval( :GetAll(), {|aMacInfo| cStr += aMacInfo[1] + "--" + ;
aMacInfo[2] + "--" + ;
aMacInfo[3] + CRLF } )
MsgAlert( cStr )
END
Return ( Nil )
Te comento, nunca lo he usado.
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
"PILO" <srmpilo@hotmail.com> escribió en el mensaje news:[email=46e55d6f@ozsrv2.ozlan.local...]46e55d6f@ozsrv2.ozlan.local...[/email]
> Probado y funciona
> Alguie tiene para leer la dirección mac de tarjetas de red
>
> "PILO" <srmpilo@hotmail.com> escribió 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
>>
>>
>
>
--
Avatar de Usuario
Carlos Ortiz
Mensajes: 873
Registrado: Mié Jul 01, 2009 5:44 pm
Ubicación: Argentina - Córdoba
Contactar:

leer numero serie disco duro

Mensaje por Carlos Ortiz »

// (c) FiveTech 1993-9
#include <WinTen.h>
#include <Windows.h>
#include <ClipApi.h>
#include <dos.h>
typedef struct
{
WORD DUM;
LONG lSerie;
BYTE Volume[ 11 ];
BYTE fat[ 8 ];
} HDINFO;
typedef struct
{
DWORD edi, esi, ebp, reserved, ebx, edx, ecx, eax;
WORD flags, es, ds, fs, gs, ip, cs, sp, ss;
} REALMODEINT;
void pascal Dos3Call( void );
//---------------------------------------------------------- ------//
#ifndef __FLAT__
static BOOL RealModeInt( WORD wIntNo, REALMODEINT * pReal )
{
asm {
push di
mov bx, wIntNo
and bx, 0x00FF
mov cx, 0
les di, pReal
mov ax, 0x0300
int 0x31
pop di
}
return pReal->flags & 1;
}
//---------------------------------------------------------- ------//
static LONG lSerialHD( WORD wDrive )
{
DWORD DosHandle = GlobalDosAlloc( sizeof( HDINFO ) );
REALMODEINT sInt;
LONG lHD;
_bset( ( LPBYTE ) &sInt, ( BYTE ) 0, sizeof( REALMODEINT ) );
sInt.eax = 0x00006900;
sInt.ebx = wDrive; // C: = 3
sInt.ds = HIWORD( DosHandle );
sInt.edx = 0L;
RealModeInt( 0x0021, &sInt );
// Check for error result
if( RealModeInt( 0x0021, &sInt ) )
lHD = 0; // returned value if there is an error
else
lHD = ( ( HDINFO * ) MK_FP( LOWORD( DosHandle ), sInt.edx ) )->lSerie;
GlobalDosFree( LOWORD( DosHandle ) );
return lHD;
}
#endif
//---------------------------------------------------------- ------//
#ifdef __FLAT__
CLIPPER NSERIALHD( PARAMS )
{
BYTE VolumeNameBuffer[ 100 ];
BYTE FileSystemNameBuffer[ 100 ];
DWORD dwVolumeSerialNumber;
GetVolumeInformation( PCOUNT() ? _parc( 1 ): "C:",
( char * ) VolumeNameBuffer, sizeof( VolumeNameBuffer ),
&dwVolumeSerialNumber, 0, 0,
( char * ) FileSystemNameBuffer,
sizeof( FileSystemNameBuffer ) );
_retnl( dwVolumeSerialNumber );
}
#else
CLIPPER nSerialHD( PARAMS )
{
WORD wDrive;
if( PCOUNT() )
{
wDrive = _parc( 1 )[ 0 ];
if( wDrive >= 'a' && wDrive <= 'z' )
wDrive -= ( 'a' - 1 );
else
wDrive -= ( 'A' - 1 );
}
else
{
_AH = 0x19;
Dos3Call();
wDrive = _AL + 1;
}
_retnl( lSerialHD( wDrive ) );
}
#endif
//---------------------------------------------------------- ------//
#ifndef __FLAT__
static LONG lSerialA( void )
{
DWORD DosHandle = GlobalDosAlloc( 512 );
REALMODEINT sInt;
LONG lHD;
_bset( ( LPBYTE ) &sInt, ( BYTE ) 0, sizeof( REALMODEINT ) );
sInt.eax = 0x00000201; // AL nº sectors to read
sInt.ebx = 0x00000000; // BX offset buffer
sInt.ecx = 0x00000001; // CH track, CL sector (1...)
sInt.edx = 0x00000000; // DH Head, DL drive
sInt.es = HIWORD( DosHandle ); // ES segment buffer
RealModeInt( 0x0013, &sInt );
if( sInt.flags & 1 )
lHD = 0;
else
lHD = * ( long * ) MK_FP( LOWORD( DosHandle ), 39 );
GlobalDosFree( LOWORD( DosHandle ) );
return lHD;
}
//---------------------------------------------------------- ------//
CLIPPER nSerialA( PARAMS )
{
_retnl( lSerialA() );
}
//---------------------------------------------------------- ------//
#else
CLIPPER NSERIALA( PARAMS )
{
BYTE VolumeNameBuffer[ 100 ];
BYTE FileSystemNameBuffer[ 100 ];
DWORD dwVolumeSerialNumber;
GetVolumeInformation( "A:",
( char * ) VolumeNameBuffer, sizeof( VolumeNameBuffer ),
&dwVolumeSerialNumber, 0, 0,
( char * ) FileSystemNameBuffer,
sizeof( FileSystemNameBuffer ) );
_retnl( dwVolumeSerialNumber );
}
#endif
//---------------------------------------------------------- ------//
Responder