Compartilhar via


Solicitações de E/S de Cartão SD

Os IOCTLs nesta seção permitem que aplicativos no modo de usuário operem dispositivos na pilha de cartões SD (Secure Digital). 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. Para obter mais informações sobre a arquitetura do SD do Windows, consulte a Pilha de Driver de Cartão SD.

Esta seção descreve os seguintes IOCTLs:

IOCTL_SFFDISK_DEVICE_COMMAND

IOCTL_SFFDISK_DEVICE_PASSWORD

IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL