VirtualBox

Ignore:
Timestamp:
Aug 29, 2008 4:52:20 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
35668
Message:

IPRT: Implemented RTR3Init*WithProgramPath. Added RTPathParse. Cleaned up the RTPathProgram and RTProcGetExecutableName implementations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstPath.cpp

    r8245 r11836  
    3333*******************************************************************************/
    3434#include <iprt/path.h>
    35 #include <iprt/runtime.h>
     35#include <iprt/process.h>
     36#include <iprt/initterm.h>
    3637#include <iprt/stream.h>
    3738#include <iprt/err.h>
     
    4546        { \
    4647            cErrors++; \
    47             RTPrintf("\ntstPath: FAILED calling " #method " at line %d: rc=%Vrc\n", __LINE__, rc); \
     48            RTPrintf("\ntstPath: FAILED calling " #method " at line %d: rc=%Rrc\n", __LINE__, rc); \
    4849        } \
    4950    } while (0)
     
    6162
    6263    /*
    63      * RTPathProgram, RTPathUserHome
     64     * RTPathProgram, RTPathUserHome and RTProcGetExecutableName.
    6465     */
    6566    char szPath[RTPATH_MAX];
     
    7071    if (RT_SUCCESS(rc))
    7172        RTPrintf("UserHome={%s}\n", szPath);
     73    if (RTProcGetExecutableName(szPath, sizeof(szPath)) == szPath)
     74        RTPrintf("ExecutableName={%s}\n", szPath);
     75    else
     76    {
     77        RTPrintf("tstPath: FAILED - RTProcGetExecutableName\n");
     78        cErrors++;
     79    }
     80   
    7281
    7382    /*
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