想要用Au3来格式化一下 D:盘,找了下好像只看到一个说调用
windows自带的工具来实现,但又不太理解这个 api 的调用
想问下各位有没别的不同方案或帮忙解释下这个调用的各个参数代表什么?
Local $DriveNumber=3 ;A盘为0,B盘为1,C盘为2,D盘为3,依次类推……
Local $FormatOptions=1 ;1为快速格式化,0为完全格式化
DllCall("shell32.dll","int","SHFormatDrive","hwnd",0,"int",$DriveNumber,"int",0,"int",$FormatOptions)
The handle of the parent window of the dialog. The Format dialog must have a parent window; therefore, this parameter cannot be NULL.
drive
Type: UINT
The drive to format. The value of this parameter represents a letter drive starting at 0 for the A: drive. For example, a value of 2 stands for the C: drive.
fmtID
Type: UINT
The ID of the physical format. Only the following flag is currently defined.
SHFMT_ID_DEFAULT (0xFFFF)
The default format ID.
options
Type: UINT
This value must be 0 or one of the following values that alter the default format options in the dialog. This value is regarded as a bitfield and should be treated accordingly.
SHFMT_OPT_FULL (0x0001)
0x001. If this flag is set, then the Quick Format option is selected.
Note Although this function is included in Shlobj.h only in Windows 2000 SP3 and Windows XP SP1, prior to that it was accessible through Shell32.lib. This flag is ignored under Microsoft Windows NT 4.0.
SHFMT_OPT_SYSONLY (0x0002)
0x002. Selects the Create an MS-DOS startup disk option, creating a system boot disk.