---
title: GetPortStatus
framework: usbdriverkit
role: symbol
role_heading: Instance Method
path: usbdriverkit/iousbhostdevice/getportstatus
---

# GetPortStatus

Returns the current port status of the device.

## Declaration

```occ
virtual kern_return_t GetPortStatus(uint32_t *portStatus);
```

## Parameters

- `portStatus`: A pointer to a variable. On output, the variable contains the port status. For a list of possible values, see doc://com.apple.usbdriverkit/documentation/USBDriverKit/tIOUSBHostPortStatus.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## See Also

### Getting Device Information

- [GetAddress](usbdriverkit/iousbhostdevice/getaddress.md)
- [GetSpeed](usbdriverkit/iousbhostdevice/getspeed.md)
- [GetFrameNumber](usbdriverkit/iousbhostdevice/getframenumber.md)
- [tIOUSBHostConnectionSpeed](usbdriverkit/tiousbhostconnectionspeed.md)
- [tIOUSBHostPortStatus](usbdriverkit/tiousbhostportstatus.md)
- [tIOUSBHostPortType](usbdriverkit/tiousbhostporttype.md)
