怎样修改硬盘的序列号(100分)

F

fxb

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样修改硬盘的序列号!
 
哪一个,如果是逻辑盘符的,可以,有这种工具,自己也可以编写(不过俺不会)<br>如果是物理的序列号,就蹦想了。俺也不知道他是存在盘面上还是EEPROM里面
 
谁知道如何读出呢(物理盘)
 
读出的倒有,论坛上有很多,搜索一下就能找到n个。[:)]
 
这是硬件的芯片锁定的,不能改的!如果是逻辑盘那么好办,只要改掉FAT表中的代号即可!
 
物理序列号你自己是没法更改的。
 
to yzhshi:<br>&nbsp; 关键词是什么 
 
硬盘 序列号 就应该可以,我刚才实验了一下,不少。
 
dir后看到那个序列号能改吗?
 
能!那个相对很容易,搜索一下,有类似软件,好像还有共享代码的,到Delphi.mychangshu.com看看。
 
那里好象只有读取序列号的???
 
刚才我也搜索了一遍,没找到,不过记得最近两天论坛有讨论这个问题的。<br>栋栋那里没有,到深度历险里面看看
 
硬件序列号怎么可能改的了.
 
那玩意儿能改吗?
 
读硬盘序列号,现成的函数<br><br>function GetIdeDiskSerialNumber : String;<br>type<br>&nbsp; TSrbIoControl = packed record<br>&nbsp; &nbsp; HeaderLength : ULONG;<br>&nbsp; &nbsp; Signature &nbsp; &nbsp;: Array[0..7] of Char;<br>&nbsp; &nbsp; Timeout &nbsp; &nbsp; &nbsp;: ULONG;<br>&nbsp; &nbsp; ControlCode &nbsp;: ULONG;<br>&nbsp; &nbsp; ReturnCode &nbsp; : ULONG;<br>&nbsp; &nbsp; Length &nbsp; &nbsp; &nbsp; : ULONG;<br>&nbsp; end;<br>&nbsp; SRB_IO_CONTROL = TSrbIoControl;<br>&nbsp; PSrbIoControl = ^TSrbIoControl;<br><br>&nbsp; TIDERegs = packed record<br>&nbsp; &nbsp; bFeaturesReg &nbsp; &nbsp; : Byte; // Used for specifying SMART "commands".<br>&nbsp; &nbsp; bSectorCountReg &nbsp;: Byte; // IDE sector count register<br>&nbsp; &nbsp; bSectorNumberReg : Byte; // IDE sector number register<br>&nbsp; &nbsp; bCylLowReg &nbsp; &nbsp; &nbsp; : Byte; // IDE low order cylinder value<br>&nbsp; &nbsp; bCylHighReg &nbsp; &nbsp; &nbsp;: Byte; // IDE high order cylinder value<br>&nbsp; &nbsp; bDriveHeadReg &nbsp; &nbsp;: Byte; // IDE drive/head register<br>&nbsp; &nbsp; bCommandReg &nbsp; &nbsp; &nbsp;: Byte; // Actual IDE command.<br>&nbsp; &nbsp; bReserved &nbsp; &nbsp; &nbsp; &nbsp;: Byte; // reserved for future use. &nbsp;Must be zero.<br>&nbsp; end;<br>&nbsp; IDEREGS &nbsp; = TIDERegs;<br>&nbsp; PIDERegs &nbsp;= ^TIDERegs;<br><br>&nbsp; TSendCmdInParams = packed record<br>&nbsp; &nbsp; cBufferSize &nbsp;: DWORD; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Buffer size in bytes<br>&nbsp; &nbsp; irDriveRegs &nbsp;: TIDERegs; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Structure with drive register values.<br>&nbsp; &nbsp; bDriveNumber : Byte; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Physical drive number to send command to (0,1,2,3).<br>&nbsp; &nbsp; bReserved &nbsp; &nbsp;: Array[0..2] of Byte; &nbsp;// Reserved for future expansion.<br>&nbsp; &nbsp; dwReserved &nbsp; : Array[0..3] of DWORD; // For future use.<br>&nbsp; &nbsp; bBuffer &nbsp; &nbsp; &nbsp;: Array[0..0] of Byte; &nbsp;// Input buffer.<br>&nbsp; end;<br>&nbsp; SENDCMDINPARAMS &nbsp; = TSendCmdInParams;<br>&nbsp; PSendCmdInParams &nbsp;= ^TSendCmdInParams;<br><br>&nbsp; TIdSector = packed record<br>&nbsp; &nbsp; wGenConfig &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; wNumCyls &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; wReserved &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wNumHeads &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wBytesPerTrack &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; wBytesPerSector &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wSectorsPerTrack &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; wVendorUnique &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Array[0..2] of Word;<br>&nbsp; &nbsp; sSerialNumber &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Array[0..19] of Char;<br>&nbsp; &nbsp; wBufferType &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wBufferSize &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wECCSize &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; sFirmwareRev &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Array[0..7] of Char;<br>&nbsp; &nbsp; sModelNumber &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Array[0..39] of Char;<br>&nbsp; &nbsp; wMoreVendorUnique &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wDoubleWordIO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wCapabilities &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wReserved1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; wPIOTiming &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; wDMATiming &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; wBS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wNumCurrentCyls &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; wNumCurrentHeads &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; wNumCurrentSectorsPerTrack : Word;<br>&nbsp; &nbsp; ulCurrentSectorCapacity &nbsp; &nbsp;: ULONG;<br>&nbsp; &nbsp; wMultSectorStuff &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; ulTotalAddressableSectors &nbsp;: ULONG;<br>&nbsp; &nbsp; wSingleWordDMA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Word;<br>&nbsp; &nbsp; wMultiWordDMA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Word;<br>&nbsp; &nbsp; bReserved &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Array[0..127] of Byte;<br>&nbsp; end;<br>&nbsp; PIdSector = ^TIdSector;<br><br>const<br>&nbsp; IDE_ID_FUNCTION = $EC;<br>&nbsp; IDENTIFY_BUFFER_SIZE &nbsp; &nbsp; &nbsp; = 512;<br>&nbsp; DFP_RECEIVE_DRIVE_DATA &nbsp; &nbsp; &nbsp; &nbsp;= $0007c088;<br>&nbsp; IOCTL_SCSI_MINIPORT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = $0004d008;<br>&nbsp; IOCTL_SCSI_MINIPORT_IDENTIFY &nbsp;= $001b0501;<br>&nbsp; DataSize = sizeof(TSendCmdInParams)-1+IDENTIFY_BUFFER_SIZE;<br>&nbsp; BufferSize = SizeOf(SRB_IO_CONTROL)+DataSize;<br>&nbsp; W9xBufferSize = IDENTIFY_BUFFER_SIZE+16;<br>var<br>&nbsp; hDevice : THandle;<br>&nbsp; cbBytesReturned : DWORD;<br>&nbsp; pInData : PSendCmdInParams;<br>&nbsp; pOutData : Pointer; // PSendCmdInParams;<br>&nbsp; Buffer : Array[0..BufferSize-1] of Byte;<br>&nbsp; srbControl : TSrbIoControl absolute Buffer;<br><br>&nbsp; procedure ChangeByteOrder( var Data; Size : Integer );<br>&nbsp; var ptr : PChar;<br>&nbsp; &nbsp; &nbsp; i : Integer;<br>&nbsp; &nbsp; &nbsp; c : Char;<br>&nbsp; begin<br>&nbsp; &nbsp; ptr := @Data;<br>&nbsp; &nbsp; for i := 0 to (Size shr 1)-1 do<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; c := ptr^;<br>&nbsp; &nbsp; &nbsp; ptr^ := (ptr+1)^;<br>&nbsp; &nbsp; &nbsp; (ptr+1)^ := c;<br>&nbsp; &nbsp; &nbsp; Inc(ptr,2);<br>&nbsp; &nbsp; end;<br>&nbsp; end;<br><br>begin<br>&nbsp; Result := '';<br>&nbsp; FillChar(Buffer,BufferSize,#0);<br>&nbsp; if Win32Platform=VER_PLATFORM_WIN32_NT then<br>&nbsp; &nbsp; begin // Windows NT, Windows 2000<br>&nbsp; &nbsp; &nbsp; // Get SCSI port handle<br>&nbsp; &nbsp; &nbsp; hDevice := CreateFile( '//./Scsi0:', GENERIC_READ or GENERIC_WRITE,<br>&nbsp; &nbsp; &nbsp; &nbsp; FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0 );<br>&nbsp; &nbsp; &nbsp; if hDevice=INVALID_HANDLE_VALUE then Exit;<br>&nbsp; &nbsp; &nbsp; try<br>&nbsp; &nbsp; &nbsp; &nbsp; srbControl.HeaderLength := SizeOf(SRB_IO_CONTROL);<br>&nbsp; &nbsp; &nbsp; &nbsp; System.Move('SCSIDISK',srbControl.Signature,8);<br>&nbsp; &nbsp; &nbsp; &nbsp; srbControl.Timeout &nbsp; &nbsp; &nbsp;:= 2;<br>&nbsp; &nbsp; &nbsp; &nbsp; srbControl.Length &nbsp; &nbsp; &nbsp; := DataSize;<br>&nbsp; &nbsp; &nbsp; &nbsp; srbControl.ControlCode &nbsp;:= IOCTL_SCSI_MINIPORT_IDENTIFY;<br>&nbsp; &nbsp; &nbsp; &nbsp; pInData := PSendCmdInParams(PChar(@Buffer)+SizeOf(SRB_IO_CONTROL));<br> pOutData := pInData;<br>&nbsp; &nbsp; &nbsp; &nbsp; with pInData^ do<br>&nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cBufferSize &nbsp;:= IDENTIFY_BUFFER_SIZE;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bDriveNumber := 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; with irDriveRegs do<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bFeaturesReg &nbsp; &nbsp; := 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bSectorCountReg &nbsp;:= 1;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bSectorNumberReg := 1;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bCylLowReg &nbsp; &nbsp; &nbsp; := 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bCylHighReg &nbsp; &nbsp; &nbsp;:= 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bDriveHeadReg &nbsp; &nbsp;:= $A0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bCommandReg &nbsp; &nbsp; &nbsp;:= IDE_ID_FUNCTION;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; &nbsp; if not DeviceIoControl( hDevice, IOCTL_SCSI_MINIPORT, @Buffer, BufferSize, @Buffer, BufferSize, cbBytesReturned, nil ) then Exit;<br>&nbsp; &nbsp; &nbsp; finally<br>&nbsp; &nbsp; &nbsp; &nbsp; CloseHandle(hDevice);<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; end<br>&nbsp; else<br>&nbsp; &nbsp; begin // Windows 95 OSR2, Windows 98<br>&nbsp; &nbsp; &nbsp; hDevice := CreateFile( '//./SMARTVSD', 0, 0, nil, CREATE_NEW, 0, 0 );<br>&nbsp; &nbsp; &nbsp; if hDevice=INVALID_HANDLE_VALUE then Exit;<br> try<br>&nbsp; &nbsp; &nbsp; pInData := PSendCmdInParams(@Buffer);<br> pOutData := PChar(@pInData^.bBuffer);<br>&nbsp; &nbsp; &nbsp; with pInData^ do<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; cBufferSize &nbsp;:= IDENTIFY_BUFFER_SIZE;<br>&nbsp; &nbsp; &nbsp; &nbsp; bDriveNumber := 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; with irDriveRegs do<br>&nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bFeaturesReg &nbsp; &nbsp; := 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bSectorCountReg &nbsp;:= 1;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bSectorNumberReg := 1;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bCylLowReg &nbsp; &nbsp; &nbsp; := 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bCylHighReg &nbsp; &nbsp; &nbsp;:= 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bDriveHeadReg &nbsp; &nbsp;:= $A0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bCommandReg &nbsp; &nbsp; &nbsp;:= IDE_ID_FUNCTION;<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; if not DeviceIoControl( hDevice, DFP_RECEIVE_DRIVE_DATA, pInData, SizeOf(TSendCmdInParams)-1, pOutData, W9xBufferSize, cbBytesReturned, nil ) then Exit;<br> finally<br>&nbsp; &nbsp; &nbsp; &nbsp; CloseHandle(hDevice);<br> end;<br>&nbsp; &nbsp; end;<br>&nbsp; &nbsp; with PIdSector(PChar(pOutData)+16)^ do<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; ChangeByteOrder(sSerialNumber,SizeOf(sSerialNumber));<br>&nbsp; &nbsp; &nbsp; SetString(Result,sSerialNumber,SizeOf(sSerialNumber));<br>&nbsp; &nbsp; end;<br>end;<br>
 
肯定可以改,否则硬盘制造厂怎么写进去的。<br>但Windows环境恐怕不行。
 
就想网卡的mac一样,有的网卡设置程序也可以改的,但是我们似乎没办法,因为各自的接口不同。<br>不知道硬盘和这个是否一样。
 
那有没有通用的网卡设置程序呢?
 
顶部