Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Obtain Hard Drive Serial Number
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00475301
Message ID:
00488747
Vues:
21
>>>>I want to go one step further and actually *set* the serial number through the API. Have you ever seen that done? A software problem just jumped into my lap where the app registration was linked to the HD serial number (I hate that) and now that the HD contents were moved to a newer larger drive, the app won't run. :( I know the old serial number, so if I can just change it on this drive I'd be set...
>>>
>>>Whoops, slight correction
>>>
>>>SetVolumeLabel() is as close as you can come. The API provides no functionality to directly set the serial number. In order to do so, you'd have to access a of ROM BIOS interrupt call. Specifically, Int 21h Function 440Dh Minor Code 46h for FAT32. In order to do so, I think you'd have to write a virtual device driver in C.
>>>
>>>Int 21h Function 440Dh Minor Code 66h returns the serial number.
>>
>>I don't think he is talking about the actual hardware/firmware serial number, but the volume serial number. You can have up to 4 or more if you have that many partitions. I believe you would only need to do a low level write to the fat (or nt equivelent) of the drive to do that. Partition Magic might have the ability to do something like that in its current version. I know you used to be able to do that with norton utilities in win95 etc.
>
>These functions don't deal with the hardware/firmware. From the Platform SDK: Win32 API:
>
>Int 21h Function 440Dh Minor Code 46h (FAT32)
>Sets the volume label, serial number, and file system for the specified drive.


It doesn't look like there is an easy way to do that. AAMOF, I don't even get a serial number if I try to check the number of a network drive, maybe I am just doing it wrong.
Cy Welch
Senior Programmer/Analyst
MetSYS Inc
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform