---
title: GetBusDeviceFunction
framework: pcidriverkit
role: symbol
role_heading: Instance Method
path: pcidriverkit/iopcidevice/getbusdevicefunction
---

# GetBusDeviceFunction

Returns the device’s bus, device, and function numbers.

## Declaration

```occ
virtual kern_return_t GetBusDeviceFunction(uint8_t *returnBusNumber, uint8_t *returnDeviceNumber, uint8_t *returnFunctionNumber);
```

## Parameters

- `returnBusNumber`: A variable in which you want to store the bus number.
- `returnDeviceNumber`: A variable in which you want to store the device number.
- `returnFunctionNumber`: A variable in which you want to store the function number.

## Return Value

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

## See Also

### Getting Device Information

- [FindPCICapability](pcidriverkit/iopcidevice/findpcicapability.md)
- [PCI Capabilities](pcidriverkit/pci-capabilities-enum.md)
- [Slot Capabilities](pcidriverkit/slot-capabilities-enum.md)
