SD Card I/O Requests
The IOCTLs in this section allow user-mode applications to operate devices in the Secure Digital (SD) card stack. To use the IOCTLs, the caller must first use CreateFile to get a handle to a device in the SD stack, as shown here, where szDevice points to a NULL-terminated string that references the device.
hVol = CreateFile (szDevice,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL
);
if (hVol == INVALID_HANDLE_VALUE) {
return GetLastError();
}
After opening a handle to a volume in the SD stack, the application sends IOCTLs to a device in the SD stack by calling DeviceIoControl. For more information about the Windows SD architecture, see SD Card Driver Stack.
This section describes the following IOCTLs: