flat assembler
Message board for the users of flat assembler.
Index
> Windows > Reading Lba HDD sectors! |
Author |
|
Dilshod 15 Mar 2005, 11:21
How can I read all the LbaHDD sectors to file, from Windows or Dos?
thanks |
|||
15 Mar 2005, 11:21 |
|
Dilshod 16 Mar 2005, 04:51
Any body knows where can I get
VWIN32_DIOC_DOS_INT25 and VWIN32_DIOC_DOS_DRIVEINFO constants values, wich used with 'DeviceIoControl' kernel function? |
|||
16 Mar 2005, 04:51 |
|
Dilshod 16 Mar 2005, 06:45
Thanks,
But still not working (Win98) Code: FileName db ''\\.\vwin32',0 Regs: REAX dd 0 RECX dd 0 REDX dd 0 REBX dd 0 RESP dd 0 REBP dd 0 RESI dd 0 REDI dd 0 Main: invoke CreateFile,FileName,\ GENERIC_READ,0,0,0,FILE_FLAG_DELETE_ON_CLOSE,0 mov [hDevice],eax mov [REAX],3 ;Disk 3-C mov [REBX],Bts_ ;Buffer mov [RECX],1 ;Sectors Cnt mov [REDX],1 ;From invoke DeviceIoControl,\ [hDevice],VWIN32_DIOC_DOS_INT25,Regs,8*4,Regs,nb,0 invoke CloseHandle,[hDevice] |
|||
16 Mar 2005, 06:45 |
|
Dilshod 16 Mar 2005, 09:26
All Ok, I found it,
Code: Regs: REBX dd 0 REDX dd 0 RECX dd 0 REAX dd 0 REDI dd 0 RESI dd 0 Flags dd 0 d_str: diStartSector dd 0 diSectors dw 0 diBuffer dd 0 Main: mov [diStartSector],1 ;Beg Sect .Next: invoke CreateFile,FileName,GENERIC_READ,0,0,0,\ FILE_FLAG_DELETE_ON_CLOSE,0 mov [hDevice],eax mov [diSectors],128 ;Sectors Cnt mov [diBuffer],Bts_ ;Buffer mov [REAX],7305h mov [REBX],d_str mov [RECX],-1 mov [REDX],6 ;Disk mov [Flags],1 invoke DeviceIoControl,[hDevice],\ VWIN32_DIOC_DOS_DRIVEINFO,Regs,7*4,Regs,7*4,nb,0 invoke CloseHandle,[hDevice] |
|||
16 Mar 2005, 09:26 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.