msvcrt: Implement getenv_s and _wgetenv_s, forwards from msvcr80, 90 and 100
Piotr Caban
piotr.caban at gmail.com
Wed Jun 23 12:12:54 CDT 2010
On 06/23/10 15:26, Paul Chitescu wrote:
> /*********************************************************************
> + * getenv_s - not exported in native msvcrt
> + */
> +int CDECL getenv_s(size_t *size, char *buffer, size_t bufLen, const char *name
Both getenv_s and _wgetenv_s are exported in native msvcrt.
> + unsigned int len = strlen(var) + 1;
> + *size = len;
> + if (len > bufLen)
> + return MSVCRT_ERANGE;
If bufLen is set to 0 the function is used for obtaining output size. No
ERANGE error is returned in this case.
Cheers,
Piotr
More information about the wine-devel
mailing list