阅读:1511回复:2
那位大虾知道怎么格式化软盘?
有没有api可以用,
或者怎么直接写软盘地扇区达到格盘地效果 多谢! |
|
沙发#
发布于:2001-06-24 11:19
以下代码片段摘自邹丹给出的加密程序
.data REGS = $ reg_EBX dd 0 reg_EDX dd 0 reg_ECX dd 0 reg_EAX dd 0 reg_EDI dd 0 reg_ESI dd 0 reg_Flags dd 0 Format_ID db 18h,1h,1h,2h db 18h,1h,2h,2h db 18h,1h,3h,2h db 18h,1h,4h,2h db 18h,1h,5h,2h db 18h,1h,6h,2h db 18h,1h,7h,2h db 18h,1h,8h,2h db 18h,1h,9h,2h db 18h,1h,0ah,2h db 18h,1h,0bh,2h db 18h,1h,0ch,2h db 18h,1h,0dh,2h db 18h,1h,0eh,2h db 18h,1h,0fh,2h db 18h,1h,10h,2h db 18h,1h,11h,2h db 18h,1h,12h,2h File db "\\.\vwin32",0 hDevice dd 0 .code ......... push NULL push FILE_FLAG_DELETE_ON_CLOSE push 0 push 0 push 3 push 0 push Offset File call CreateFileA mov hDevice,eax DeviceIoControl (hVWin32, VWIN32_DIOC_DOS_IOCTL, ®s, sizeof(regs), ®s, sizeof(regs), &cb, 0); mov reg_EAX,0500h mov reg_EDX,0100h mov reg_ECX,1800h mov reg_EBX,offset Format_ID push 0 push offset CB push 7*4 push offset REGS push 7*4 push offset REGS push 4 push hDevice call DeviceIoControl and reg_Flags,0001h jnz Format_err |
|
板凳#
发布于:2001-10-19 12:54
如果不想自己开发,你在网上搜索一下吧。
自己开发有好多种方法: 1、在VxD中,利用INT 13H格式化磁盘的功能调用即可,甚至格式化出特殊磁道来:) 2、利用Win32 API调用,这方面查阅MSDN即可。 以上两种方法的应用程序我用Delphi做过。 |
|
|