<!--
{
  "availability" : [
    "DriverKit: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "PCIDriverKit",
  "identifier" : "/documentation/PCIDriverKit/IOPCIDevice/GetBusDeviceFunction",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PCIDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOPCIDevice@F@GetBusDeviceFunction#*c#S0_#S0_#"
  },
  "title" : "GetBusDeviceFunction"
}
-->

# GetBusDeviceFunction

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

```
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

<doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> on success, or another value if an error occurs. See <doc://com.apple.documentation/documentation/DriverKit/error-codes>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)