Share via


IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER IOCTL (winioctl.h)

Recupera o número de série de um dispositivo USB.

Para executar essa operação, chame a função DeviceIoControl com os parâmetros a seguir.

BOOL DeviceIoControl(
  (HANDLE) hDevice,                         // handle to device
  IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER,    // dwIoControlCode
  NULL,                                     // lpInBuffer
  0,                                        // nInBufferSize
  (LPVOID) lpOutBuffer,                     // output buffer
  (DWORD) nOutBufferSize,                   // size of output buffer
  (LPDWORD) lpBytesReturned,                // number of bytes returned
  (LPOVERLAPPED) lpOverlapped               // OVERLAPPED structure
);

Requisitos

   
Cliente mínimo com suporte Windows XP
Servidor mínimo com suporte Windows Server 2003
Cabeçalho winioctl.h (inclua Windows.h)

Confira também