# PxIOSetLibOption

> Source: https://manual.pvxplus.com/pxio-library/library-functions/global-library-functions/pxiosetliboption

## Description

Sets a global library option

## Format

**int** **PxIOSetLibOption(PxIOService service, PxIOLibOptionType type, int value);**

***Where:***

|  |  |
| --- | --- |
| **service** | A valid PxIOService handle. See **[PxIOCreateService](https://manual.pvxplus.com/pxio-library/library-functions/service-functions/pxiocreateservice)** for more information on creating a service and obtaining a service handle. This option is necessary to ensure that the calling process is a legitimate client of the library. |
| **type** | Library option value to set. The available options are listed in **[Appendix A](https://manual.pvxplus.com/pxio-library/library-functions/appendix-references/appendix-a)**. |
| **value** | New library option value. The range of allowed values for each option are stated in **[Appendix A](https://manual.pvxplus.com/pxio-library/library-functions/appendix-references/appendix-a)**. |

## Return Value

If the function succeeds, a value of PXIO_SUCCESS_STATUS is returned; otherwise, an error value is returned. More information on the nature of the error can be found by calling **[PxIOGetError](https://manual.pvxplus.com/pxio-library/library-functions/error-functions/pxiogeterror)**.
