VC++ Diskette formatieren

Hallo,

wie kann ich aus VC++ 6.0 (mit Unterstuetzung der MFC) eine Diskette formatieren? Es soll unter Win95/98 UND NT laufen! Mit CreateFile(…) hatte ich keinen Erfolg. Ebensowenig mit DeviceIoControl und IOCTL_DISK_VERIFY -> Windows 95 unsupported!
Im Windows-Explorer funktioniert es auch „irgendwie“! Wer weiss Rat, oder kennt das Interface, welches vom Explorer aus aufgerufen wird?!?

Danke schon mal und

Tschuessi
Andreas Lass
[email protected]

Eine Möglichkeit (allerdings ohne die MFC’s)

// Declare the constants and SHFormatDrive function.

#define SHFMT_ID_DEFAULT 0xFFFF

#define SHFMT_OPT_QUICK 0x0000
#define SHFMT_OPT_FULL 0x0001
#define SHFMT_OPT_SYSONLY 0x0002

#define SHFMT_ERROR 0xFFFFFFFFL
#define SHFMT_CANCEL 0xFFFFFFFEL
#define SHFMT_NOFORMAT 0xFFFFFFFDL

extern „C“
DWORD WINAPI SHFormatDrive(HWND, UINT, UINT, UINT);

// Call SHFormatDrive to format drive A
int Res = SHFormatDrive(Handle,
0, SHFMT_ID_DEFAULT, SHFMT_OPT_FULL);

// Report the results.
if (Res