The IOCTLs in this section allow user-mode applications to operate devices in the Secure Digial (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.
Code:
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();
}
For more information go to this link.
Bookmarks