Previous | Next |
The Initialize method formats the storage medium.
Syntax
HRESULT Initialize(
UINT fuMode,
IWMDMProgress* pProgress
);
Parameters
fuMode
[in] Mode used to initialize the medium. Specify exactly one of the following two modes. If both modes are specified, block mode is used.
Mode | Description |
WMDM_MODE_BLOCK | The operation will be performed using block mode processing. The call will not return until the operation is completed. |
WMDM_MODE_THREAD | The operation will be performed using thread mode processing. The call will return immediately, and the operation will be performed in a background thread. |
[in] pProgress
Pointer to an IWMDMProgress interface implemented by an application to track the progress of the formatting operation.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Description |
WMDM_E_NOTSUPPORTED | The media device does not support initializing. |
E_BUSY | The media device is performing an operation. |
E_INVALIDARG | An invalid mode has been specified in the fuMode parameter. |
E_FAIL | An unspecified error occurred. |
See Also
Previous | Next |