VirtualBox

Changeset 50642 in vbox for trunk/include


Ignore:
Timestamp:
Feb 27, 2014 8:22:26 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92536
Message:

iprt/env.h: Added RTEnvCountEx and RTEnvGetByIndexEx for enumerating the environment.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/env.h

    r50408 r50642  
    257257RTDECL(char *) RTEnvDupEx(RTENV Env, const char *pszVar);
    258258
     259/**
     260 * Counts the variables in the environment.
     261 *
     262 * @returns Number of variables in the environment. UINT32_MAX on error.
     263 * @param   hEnv        The environment handle.
     264 *                      RTENV_DEFAULT is currently not accepted.
     265 */
     266RTDECL(uint32_t) RTEnvCountEx(RTENV hEnv);
     267
     268/**
     269 * Queries an environment variable by it's index.
     270 *
     271 * This can be used together with RTEnvCount to enumerate the environment block.
     272 *
     273 * @returns IPRT status code.
     274 * @retval  VERR_ENV_VAR_NOT_FOUND if the index is out of bounds, output buffers
     275 *          untouched.
     276 * @retval  VERR_BUFFER_OVERFLOW if one of the buffers are too small.  We'll
     277 *          fill it with as much we can in RTStrCopy fashion.
     278 *
     279 * @param   hEnv        The environment handle.
     280 *                      RTENV_DEFAULT is currently not accepted.
     281 * @param   iVar        The variable index.
     282 * @param   pszVar      Variable name buffer.
     283 * @param   cbVar       The size of the variable name buffer.
     284 * @param   pszValue    Value buffer.
     285 * @param   cbValue     The size of the value buffer.
     286 */
     287RTDECL(uint32_t) RTEnvGetByIndexEx(RTENV hEnv, uint32_t iVar, char *pszVar, size_t cbVar, char *pszValue, size_t cbValue);
     288
    259289#endif /* IN_RING3 */
    260290
  • trunk/include/iprt/mangling.h

    r50526 r50642  
    495495# define RTDvmVolumeCreateVfsFile                       RT_MANGLER(RTDvmVolumeCreateVfsFile)
    496496# define RTEnvClone                                     RT_MANGLER(RTEnvClone)
     497# define RTEnvCountEx                                   RT_MANGLER(RTEnvCountEx)
    497498# define RTEnvCreate                                    RT_MANGLER(RTEnvCreate)
    498499# define RTEnvDestroy                                   RT_MANGLER(RTEnvDestroy)
     
    505506# define RTEnvGet                                       RT_MANGLER(RTEnvGet)
    506507# define RTEnvGetBad                                    RT_MANGLER(RTEnvGetBad)
     508# define RTEnvGetByIndexEx                              RT_MANGLER(RTEnvGetByIndexEx)
    507509# define RTEnvGetUtf8                                   RT_MANGLER(RTEnvGetUtf8)
    508510# define RTEnvGetEx                                     RT_MANGLER(RTEnvGetEx)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette