VirtualBox

Changeset 69688 in vbox for trunk/include/iprt/nt


Ignore:
Timestamp:
Nov 14, 2017 2:44:25 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119060
Message:

iprt: pathint-nt.cpp: Added RTNtPathRelativeFromUtf8 for RTDirRel. Untested.

File:
1 edited

Legend:

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

    r69105 r69688  
    292292
    293293/**
     294 * How to handle ascent ('..' relative to a root handle).
     295 */
     296typedef enum RTNTPATHRELATIVEASCENT
     297{
     298    kRTNtPathRelativeAscent_Invalid = 0,
     299    kRTNtPathRelativeAscent_Allow,
     300    kRTNtPathRelativeAscent_Fail,
     301    kRTNtPathRelativeAscent_Ignore,
     302    kRTNtPathRelativeAscent_End,
     303    kRTNtPathRelativeAscent_32BitHack = 0x7fffffff
     304} RTNTPATHRELATIVEASCENT;
     305
     306/**
     307 * Converts a relative windows-style path to relative NT format and encoding.
     308 *
     309 * @returns IPRT status code.
     310 * @param   pNtName             Where to return the NT name.  Free using
     311 *                              rtTNtPathToNative with phRootDir set to NULL.
     312 * @param   phRootDir           On input, the handle to the directory the path
     313 *                              is relative to.  On output, the handle to
     314 *                              specify as root directory in the object
     315 *                              attributes when accessing the path.  If
     316 *                              enmAscent is kRTNtPathRelativeAscent_Allow, it
     317 *                              may have been set to NULL.
     318 * @param   pszPath             The relative UTF-8 path.
     319 * @param   enmAscent           How to handle ascent.
     320 */
     321RTDECL(int) RTNtPathRelativeFromUtf8(struct _UNICODE_STRING *pNtName, PHANDLE phRootDir,
     322                                     const char *pszPath, RTNTPATHRELATIVEASCENT enmAscent);
     323
     324/**
    294325 * Ensures that the NT string has sufficient storage to hold @a cwcMin RTUTF16
    295326 * chars plus a terminator.
     
    308339 * Frees the native path and root handle.
    309340 *
    310  * @param   pNtName             The NT path from a successful call to
    311  *                              RTNtPathFromWinUtf8 or RTNtPathFromWinUtf16Ex.
    312  * @param   phRootDir           The root handle variable from the same call.
     341 * @param   pNtName             The NT path after a successful rtNtPathToNative
     342 *                              call or RTNtPathRelativeFromUtf8.
     343 * @param   phRootDir           The root handle variable from rtNtPathToNative,
    313344 */
    314345RTDECL(void) RTNtPathFree(struct _UNICODE_STRING *pNtName, HANDLE *phRootDir);
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