The following post is from the Wan Qian News Group, but unfortunately this country is currently closed, I don't know when it can be reopened :(
Sendant: Yesterday I fell
If you are lucky, this time you can't die, there is an unapproved function below:
#pragma comment (Lib, "shell32.lib")
// dwOptions parameters #define SHFMT_OPT_FULL 0x0001 // fully formatted, without it represents a quick format #define SHFMT_OPT_SYSONLY 0x0002 // just pass system, the equivalent format / s // dwFormatID parameters #define SHFMT_ID_DEFAULT 0xFFFF // do not know what it means
// Return value #define shfmt_noformat 0xffffffd // Cannot format the drive #define shfmt_cancel 0xffffffe // User canceled operation #define shfmt_error 0xfffffffff // Other errors
DWORD WINAPI SHFORMATDRIVE (HWND HPARENTWND, DWORD DWDRIVENO, DWORD DWFORMATID, DWORD DWOptions);
HparentWnd is a parent window handle Dwdriveno is the most typed drive number, 0 is A:, 1 is B:, I don't know what to do, you must be set to SHFMT_ID_DEFAULTDWOPTIONS can take the SHFMT_OPT_ series value, in NT / 2K can't add shfmt_opt_sysonly
The return value of this function is described above.
This function is tested under 9x / NT / 2K and can run normally, but pay attention to permissions under NT / 2K.
- I fell yesterday, I hope that I will not fall in the same place today.
"wangpeng"
- ================================================================================================================================ 4-21 important Notice.