VirtualBox

Changeset 83661 in vbox for trunk


Ignore:
Timestamp:
Apr 9, 2020 6:53:23 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137132
Message:

IPRT/process: Added RTProcExecutablePath as a buffer-less alternative to RTProcGetExecutablePath. bugref:9670

Location:
trunk
Files:
3 edited

Legend:

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

    r83546 r83661  
    17411741# define RTProcDaemonize                                RT_MANGLER(RTProcDaemonize)
    17421742# define RTProcDaemonizeUsingFork                       RT_MANGLER(RTProcDaemonizeUsingFork)
     1743# define RTProcExecutablePath                           RT_MANGLER(RTProcExecutablePath)
    17431744# define RTProcGetAffinityMask                          RT_MANGLER(RTProcGetAffinityMask)
    17441745# define RTProcGetExecutablePath                        RT_MANGLER(RTProcGetExecutablePath)
  • trunk/include/iprt/process.h

    r82968 r83661  
    330330 *
    331331 * @returns Pointer to read-only name string.
     332 * @note    IPRT must've been initialized or the string will be empty.
    332333 */
    333334RTR3DECL(const char *) RTProcShortName(void);
     
    335336/**
    336337 * Gets the path to the executable image of the current process.
     338 *
     339 * @returns Pointer to read-only path string.
     340 * @note    IPRT must've been initialized or the string will be empty.
     341 */
     342RTR3DECL(const char *) RTProcExecutablePath(void);
     343
     344/**
     345 * Gets a copy of the path to the executable image of the current process.
    337346 *
    338347 * @returns pszExecPath on success. NULL on buffer overflow or other errors.
     
    340349 * @param   pszExecPath     Where to store the path.
    341350 * @param   cbExecPath      The size of the buffer.
     351 * @note    IPRT must've been initialized or the string will be empty.
    342352 */
    343353RTR3DECL(char *) RTProcGetExecutablePath(char *pszExecPath, size_t cbExecPath);
  • trunk/src/VBox/Runtime/r3/process.cpp

    r82968 r83661  
    113113
    114114
     115RTR3DECL(const char *) RTProcExecutablePath(void)
     116{
     117    return g_szrtProcExePath;
     118}
     119
     120
    115121RTR3DECL(const char *) RTProcShortName(void)
    116122{
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