![]() Raise Exception. Procedure ReadBoot95(Drive: Char var Boot: TSector) Result := DeviceIoControl(Device, Ord(CtlCode), SizeOf(Regs), Count, nil) If not WriteFile(H, Boot, SizeOf(Boot), BytesWritten, nil)thenĮBX, EDX, ECX, EAX, EDI, ESI, Flags: LongWord end ![]() GENERIC_WRITE, 0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) Can I access to a disk drive using volume ID instead of a drive letter in Windows It could be very useful for external. We can retrieve bios serial number using the below command. Procedure WriteBootNT(Drive: Char var Boot: TSector) Description The GetDiskSerial.DLL is a standard 32-bit DLL file.You can use it to read the serial number of hard disk easily. If not ReadFile(H, Boot, SizeOf(Boot), BytesRead, nil)then Raise Exception.Create(SysErrorMessage(GetLastError)) GENERIC_READ, 0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) Procedure ReadBootNT(Drive: Char var Boot: TSector) So here's the complete code, taking into account the differences between NT and Win95/98: ![]() Move(SerialNumber, Boot, SizeOf(SerialNumber)) Ī complication occurs, however, because reading and writing the boot sector in NT requires completely different code from that used in reading and writing the boot sector in Win95/98. Procedure ChangeVolumeSerialNumber(Drive: Char Kendi belirlediğin bir numara ile değiştirmek için DOS komut satırı altında çalışan bizzat Microsoft'un sitesinde bulunan utility tarzındaki bir yazılımı kullanabilirsin. first do a GetMediaID to fill MediaID with valid values Procedure SetDiskSerialNum( drive: word serialNo: LongInt ) TMediaID = Record // This is the MS-DOS original MediaID structur ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |