Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why can't get VolumeSerialNumber?
Message
De
09/07/2002 04:50:16
 
 
À
08/07/2002 21:41:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00676417
Message ID:
00676483
Vues:
17
Ricky,

Try this:

Declare Integer GetVolumeInformation in kernel32.dll ;
String @lpRootPathName, ;
String @lpVolumeNameBuffer, ;
Integer nVolumeNameSize, ;
Integer @lpVolumeSerialNumber, ;
Integer lpMaximumComponentLength, ;
Integer @lpFileSystemFlags, ;
String @lpFileSystemNameBuffer, ;
Integer nFileSystemNameSize

x1="C:\"
x2=SPACE(256)
x3=256
x4=0
x5=256
x6=0
x7=SPACE(256)
x8=256
y=0
y = GetVolumeInformation(@x1, @x2, x3, @x4, x5, @x6, @x7, x8)
?x4


Mace


>All,
>
>I wrote some code to get system information.
>In Win98 or win95, it can capture the system information but In Win2000 it can not.
>I don't know why.
>********************************
>Declare Integer GetVolumeInformation in kernel32.dll ;
> String lpRootPathName, ;
> String lpVolumeNameBuffer, ;
> Integer nVolumeNameSize, ;
> Integer @lpVolumeSerialNumber, ;
> Integer @lpMaximumComponentLength, ;
> Integer @lpFileSystemFlags, ;
> String lpFileSystemNameBuffer, ;
> Integer nFileSystemNameSize
>
>x1="C:\"
>x2=""
>x3=0
>x4=0
>x5=0
>x6=0
>x7=""
>x8=0
>y=0
>y = GetVolumeInformation(x1, x2, x3, @x4, @x5, @x6, x7, x8)
>?x4
>
>*****************************************
>In windows2000. x4 is Zero. Why?
>
>Regards
>Ricky
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform