# PVGetEnvMode( ): Get Environment Variables

> Source: https://manual.pvxplus.com/c-library-file-io-routines/file-io-routines/getenvmode

## Format

intptr_t **APIDEF PVGetEnvMode(HPVKENV** *hEnv*, int *iFlag*);

***Where:***

|  |  |
| --- | --- |
| *hEnv* | Handle to environment structure |
| *iFlag* | Selector of the environment variable to retrieve the value |

## Description

**PVK_GetEnvMode(** **)** is used to get the value of the environment variable. If successful, the function returns the value of the environment variable specified by *iFlag*. Returns PV_ERROR(-1) on failure.
