VirtualBox

Ignore:
Timestamp:
Mar 14, 2017 7:06:16 PM (8 years ago)
Author:
vboxsync
Message:

SharedFolders: Some adjustments necessary for flexible array syntax in SHFLSTRING.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp

    r66038 r66099  
    755755
    756756static int listDir(VBOXHGCMSVCFNTABLE *psvcTable, SHFLROOT root,
    757                    SHFLHANDLE handle, uint32_t fFlags, uint32_t cb,
     757                   SHFLHANDLE handle, uint32_t fFlags,
    758758                   const char *pcszPath, void *pvBuf, uint32_t cbBuf,
    759759                   uint32_t resumePoint, uint32_t *pcFiles)
     
    766766    aParms[1].setUInt64(handle);
    767767    aParms[2].setUInt32(fFlags);
    768     aParms[3].setUInt32(cb);
     768    aParms[3].setUInt32(cbBuf);
    769769    if (pcszPath)
    770770    {
     
    10201020    PRTDIR pDir = (PRTDIR)&g_aTestDirHandles[g_iNextDirHandle++ % RT_ELEMENTS(g_aTestDirHandles)];
    10211021    SHFLHANDLE Handle;
    1022     SHFLDIRINFO DirInfo;
     1022    union
     1023    {
     1024        SHFLDIRINFO DirInfo;
     1025        uint8_t     abBuffer[sizeof(SHFLDIRINFO) + 2 * sizeof(RTUTF16)];
     1026    } Buf;
    10231027    uint32_t cFiles;
    10241028    int rc;
     
    10311035                    SHFL_CF_DIRECTORY | SHFL_CF_ACCESS_READ, &Handle, NULL);
    10321036    RTTEST_CHECK_RC_OK(hTest, rc);
    1033     rc = listDir(&svcTable, Root, Handle, 0, sizeof (SHFLDIRINFO), NULL,
    1034                  &DirInfo, sizeof(DirInfo), 0, &cFiles);
     1037    rc = listDir(&svcTable, Root, Handle, 0, NULL, &Buf.DirInfo, sizeof(Buf), 0, &cFiles);
    10351038    RTTEST_CHECK_RC(hTest, rc, VERR_NO_MORE_FILES);
    10361039    RTTEST_CHECK_MSG(hTest, g_testRTDirReadExDir == pDir, (hTest, "Dir=%p\n", g_testRTDirReadExDir));
Note: See TracChangeset for help on using the changeset viewer.

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