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

# GetPortStatus

Gets the current port status.

## Declaration

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

## Parameters

- `portStatus`: A pointer to a variable. On return, the variable contains the port status. For a list of possible port status 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

### Configuring the Interface

- [GetFrameNumber](usbdriverkit/iousbhostinterface/getframenumber.md)
- [SelectAlternateSetting](usbdriverkit/iousbhostinterface/selectalternatesetting.md)
- [GetIdlePolicy](usbdriverkit/iousbhostinterface/getidlepolicy.md)
- [SetIdlePolicy](usbdriverkit/iousbhostinterface/setidlepolicy.md)
- [tIOUSBHostPortStatus](usbdriverkit/tiousbhostportstatus.md)
