网站首页  词典首页

请输入您要查询的函数:

 

术语 shformatdrive
释义 SHFormatDrive
语法:
DWORD SHFormatDrive( HWND hwnd,
UINT drive,
UINT fmtID,
UINT options
);
SHFormatDrive功能
打开壳牌的格式对话框。
参数
hwnd
[in]的处理在对话框的父窗口。在格式化对话框必须有一个父窗口,因此,这个参数不能为NULL。
驾驶
[in]要格式化的驱动器。这个参数的值表示一个字母驱动器从0开始为A:驱动器。例如,2为代表的价值的C:驱动器。
fmtID
[in]的物理格式的ID。只有下列标志目前的定义。
SHFMT_ID_DEFAULT
默认格式的ID。
选项
[in]这个值必须是0或下列值之一是改变对话框中的默认格式选项。此值被视为一个bitfield和应得的待遇。
SHFMT_OPT_FULL
0x001。如果设置此标志,然后快速格式化选项被选中。
注意:尽管此函数是在Shlobj.h只包括在Microsoft Windows 2000 Service Pack 3中(SP3)和Windows XP的服务包1(SP1)中,在此之前,它是通过Shell32.lib访问。这标志被忽略在Microsoft Windows NT 4.0。
SHFMT_OPT_SYSONLY
0x002。选择创建一个MS - DOS启动磁盘选项,创建一个系统启动盘。
返回值
返回的格式一次成功的格式或下列值之一的ID。此值LOWORD可以通过在后续调用的fmtID参数重复最后的格式。
SHFMT_ERRORAn错误发生在最后的格式。这并不表示该驱动器unformattable。
SHFMT_CANCELThe最后格式被取消。
SHFMT_NOFORMATThe驱动器不能被格式化。
备注
注意:此功能可通过Windows XP服务包2(SP2)和Windows Server 2003中。它可能更改或在Windows的后续版本中不可用。
该格式是控制对话框界面。也就是说,用户必须单击确定按钮真正开始的格式,该格式无法启动编程。
例如
这SHFormatDrive呼吁驾驶带来的格式选项中选中默认情况下,设立了壳牌的格式在磁盘对话框。
SHFormatDrive(hMainWnd,0,SHFMT_ID_DEFAULT,0);
功能信息
最低DLL版本 shell32.dll 5.0或更新版本
自定义ImplementationNo
Headershlobj.h
import libraryshell32.lib
2000年最低经营systemsWindows
==英文原文==SHFormatDrive Function
Opens the Shell's Format dialog.
Syntax
DWORD SHFormatDrive( HWND hwnd,
UINT drive,
UINT fmtID,
UINT options
);
Parameters
hwnd
[in] The handle of the parent window of the dialog. The Format dialog must have a parent window; therefore, this parameter cannot be NULL.
drive
[in] 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
[in] The ID of the physical format. Only the following flag is currently defined.
SHFMT_ID_DEFAULT
The default format ID.
options
[in] 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
0x001. If this flag is set, then the Quick Format option is selected.
Note Although this function is included in Shlobj.h only in Microsoft Windows 2000 Service Pack 3 (SP3) and Windows XP Service Pack 1 (SP1), prior to that it was accessible through Shell32.lib. This flag is ignored under Microsoft Windows NT 4.0.
SHFMT_OPT_SYSONLY
0x002. Selects the Create an MS-DOS startup disk option, creating a system boot disk.
Return Value
Returns the format ID of the last successful format or one of the following values. The LOWORD of this value can be passed on subsequent calls as the fmtID parameter to repeat the last format.
SHFMT_ERRORAn error occurred during the last format. This does not indicate that the drive is unformattable.
SHFMT_CANCELThe last format was canceled.
SHFMT_NOFORMATThe drive cannot be formatted.
Remarks
Note This function is available through Windows XP Service Pack 2 (SP2) and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows.
The format is controlled by the dialog interface. That is, the user must click the OK button to actually begin the format—the format cannot be started programmatically.
Example
This call to SHFormatDrive brings up the Shell's Format dialog box for a disk in drive A, with the default formatting options selected.
SHFormatDrive(hMainWnd, 0, SHFMT_ID_DEFAULT, 0);
Function Information
Minimum DLL Versionshell32.dll version 5.0 or later
Custom ImplementationNo
Headershlobj.h
Import libraryshell32.lib
Minimum operating systemsWindows 2000
==原始网址==http://msdn.microsoft.com/en-us/library/bb762169(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:25:38