---
title: Close
framework: pcidriverkit
role: symbol
role_heading: Instance Method
path: pcidriverkit/iopcidevice/close
---

# Close

Closes the session to the PCI device.

## Declaration

```occ
void Close(IOService *forClient, IOOptionBits options);
```

## Parameters

- `forClient`: The service object that is closing the session. If this object doesn’t have an open session to the device, this method does nothing..
- `options`: Additional options for closing the session.

## Discussion

Discussion This method closes the session previously opened by the object in the forClient parameter. The method also turns off the Bus Master Enable and Memory Space Enable bits defined in the command register of the PCI specification.

## See Also

### Running the Service

- [init](pcidriverkit/iopcidevice/init.md)
- [Open](pcidriverkit/iopcidevice/open.md)
- [free](pcidriverkit/iopcidevice/free.md)
