VirtualBox

Changeset 67180 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 31, 2017 7:39:10 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115857
Message:

IPRT: Added RTVfsMemIoStrmCreate for convenience.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/vfs/vfsmemory.cpp

    r62561 r67180  
    817817
    818818
     819RTDECL(int) RTVfsMemIoStrmCreate(RTVFSIOSTREAM hVfsIos, size_t cbEstimate, PRTVFSIOSTREAM phVfsIos)
     820{
     821    RTVFSFILE hVfsFile;
     822    int rc = RTVfsMemFileCreate(hVfsIos, cbEstimate, &hVfsFile);
     823    if (RT_SUCCESS(rc))
     824    {
     825        *phVfsIos = RTVfsFileToIoStream(hVfsFile);
     826        AssertStmt(*phVfsIos != NIL_RTVFSIOSTREAM, rc = VERR_INTERNAL_ERROR_2);
     827        RTVfsFileRelease(hVfsFile);
     828    }
     829    return rc;
     830}
     831
     832
    819833RTDECL(int) RTVfsFileFromBuffer(uint32_t fFlags, void const *pvBuf, size_t cbBuf, PRTVFSFILE phVfsFile)
    820834{
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