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

# Open

Opens a session to the PCI device.

```
kern_return_t Open(IOService *forClient, IOOptionBits options);
```

## Parameters

`forClient`

The service object that is opening the session. Typically, you specify your driver’s custom <doc://com.apple.documentation/documentation/DriverKit/IOService> object.

`options`

Additional options for opening the session.

## 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>.

## Discussion

This method gives the specified <doc://com.apple.documentation/documentation/DriverKit/IOService> object exclusive access to the PCI device. It also gives the service object access to the PCI device’s configuration and aperture space.

---

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)