Changeset 75737 in vbox for trunk/src/VBox/HostServices/SharedFolders/testcase
- Timestamp:
- Nov 26, 2018 3:44:41 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp
r75570 r75737 659 659 fillTestShflString(&Mapping, pcszMapping); 660 660 fillTestShflString(&AutoMountPoint, ""); 661 aParms[0].setPointer(&FolderName, RT_UOFFSETOF(SHFLSTRING, String)661 HGCMSvcSetPv(&aParms[0], &FolderName, RT_UOFFSETOF(SHFLSTRING, String) 662 662 + FolderName.string.u16Size); 663 aParms[1].setPointer(&Mapping, RT_UOFFSETOF(SHFLSTRING, String)663 HGCMSvcSetPv(&aParms[1], &Mapping, RT_UOFFSETOF(SHFLSTRING, String) 664 664 + Mapping.string.u16Size); 665 aParms[2].setUInt32(1);666 aParms[3].setPointer(&AutoMountPoint, SHFLSTRING_HEADER_SIZE + AutoMountPoint.string.u16Size);665 HGCMSvcSetU32(&aParms[2], 1); 666 HGCMSvcSetPv(&aParms[3], &AutoMountPoint, SHFLSTRING_HEADER_SIZE + AutoMountPoint.string.u16Size); 667 667 rc = psvcTable->pfnHostCall(psvcTable->pvService, SHFL_FN_ADD_MAPPING, 668 668 SHFL_CPARMS_ADD_MAPPING, aParms); 669 669 AssertReleaseRC(rc); 670 aParms[0].setPointer(&Mapping, RT_UOFFSETOF(SHFLSTRING, String)670 HGCMSvcSetPv(&aParms[0], &Mapping, RT_UOFFSETOF(SHFLSTRING, String) 671 671 + Mapping.string.u16Size); 672 aParms[1].setUInt32(0); /* root */673 aParms[2].setUInt32('/'); /* delimiter */674 aParms[3].setUInt32(fCaseSensitive);672 HGCMSvcSetU32(&aParms[1], 0); /* root */ 673 HGCMSvcSetU32(&aParms[2], '/'); /* delimiter */ 674 HGCMSvcSetU32(&aParms[3], fCaseSensitive); 675 675 psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0, 676 676 psvcTable->pvService, SHFL_FN_MAP_FOLDER, … … 692 692 int rc; 693 693 694 aParms[0].setUInt32(root);694 HGCMSvcSetU32(&aParms[0], root); 695 695 psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0, 696 696 psvcTable->pvService, SHFL_FN_UNMAP_FOLDER, … … 698 698 AssertReleaseRC(callHandle.rc); 699 699 fillTestShflString(&FolderName, pcszFolderName); 700 aParms[0].setPointer(&FolderName, RT_UOFFSETOF(SHFLSTRING, String)700 HGCMSvcSetPv(&aParms[0], &FolderName, RT_UOFFSETOF(SHFLSTRING, String) 701 701 + FolderName.string.u16Size); 702 702 rc = psvcTable->pfnHostCall(psvcTable->pvService, SHFL_FN_REMOVE_MAPPING, … … 717 717 RT_ZERO(CreateParms); 718 718 CreateParms.CreateFlags = fCreateFlags; 719 aParms[0].setUInt32(Root);720 aParms[1].setPointer(&Path, RT_UOFFSETOF(SHFLSTRING, String)719 HGCMSvcSetU32(&aParms[0], Root); 720 HGCMSvcSetPv(&aParms[1], &Path, RT_UOFFSETOF(SHFLSTRING, String) 721 721 + Path.string.u16Size); 722 aParms[2].setPointer(&CreateParms, sizeof(CreateParms));722 HGCMSvcSetPv(&aParms[2], &CreateParms, sizeof(CreateParms)); 723 723 psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0, 724 724 psvcTable->pvService, SHFL_FN_CREATE, … … 740 740 VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS }; 741 741 742 aParms[0].setUInt32(Root);743 aParms[1].setUInt64((uint64_t) hFile);744 aParms[2].setUInt64(offSeek);745 aParms[3].setUInt32(cbRead);746 aParms[4].setPointer(pvBuf, cbBuf);742 HGCMSvcSetU32(&aParms[0], Root); 743 HGCMSvcSetU64(&aParms[1], (uint64_t) hFile); 744 HGCMSvcSetU64(&aParms[2], offSeek); 745 HGCMSvcSetU32(&aParms[3], cbRead); 746 HGCMSvcSetPv(&aParms[4], pvBuf, cbBuf); 747 747 psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0, 748 748 psvcTable->pvService, SHFL_FN_READ, … … 760 760 VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS }; 761 761 762 aParms[0].setUInt32(Root);763 aParms[1].setUInt64((uint64_t) hFile);764 aParms[2].setUInt64(offSeek);765 aParms[3].setUInt32(cbWrite);766 aParms[4].setPointer((void *)pvBuf, cbBuf);762 HGCMSvcSetU32(&aParms[0], Root); 763 HGCMSvcSetU64(&aParms[1], (uint64_t) hFile); 764 HGCMSvcSetU64(&aParms[2], offSeek); 765 HGCMSvcSetU32(&aParms[3], cbWrite); 766 HGCMSvcSetPv(&aParms[4], (void *)pvBuf, cbBuf); 767 767 psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0, 768 768 psvcTable->pvService, SHFL_FN_WRITE, … … 779 779 VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS }; 780 780 781 aParms[0].setUInt32(root);782 aParms[1].setUInt64(handle);781 HGCMSvcSetU32(&aParms[0], root); 782 HGCMSvcSetU64(&aParms[1], handle); 783 783 psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0, 784 784 psvcTable->pvService, SHFL_FN_FLUSH, … … 796 796 VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS }; 797 797 798 aParms[0].setUInt32(root);799 aParms[1].setUInt64(handle);800 aParms[2].setUInt32(fFlags);801 aParms[3].setUInt32(cbBuf);798 HGCMSvcSetU32(&aParms[0], root); 799 HGCMSvcSetU64(&aParms[1], handle); 800 HGCMSvcSetU32(&aParms[2], fFlags); 801 HGCMSvcSetU32(&aParms[3], cbBuf); 802 802 if (pcszPath) 803 803 { 804 804 fillTestShflString(&Path, pcszPath); 805 aParms[4].setPointer(&Path, RT_UOFFSETOF(SHFLSTRING, String)805 HGCMSvcSetPv(&aParms[4], &Path, RT_UOFFSETOF(SHFLSTRING, String) 806 806 + Path.string.u16Size); 807 807 } 808 808 else 809 aParms[4].setPointer(NULL, 0);810 aParms[5].setPointer(pvBuf, cbBuf);811 aParms[6].setUInt32(resumePoint);812 aParms[7].setUInt32(0);809 HGCMSvcSetPv(&aParms[4], NULL, 0); 810 HGCMSvcSetPv(&aParms[5], pvBuf, cbBuf); 811 HGCMSvcSetU32(&aParms[6], resumePoint); 812 HGCMSvcSetU32(&aParms[7], 0); 813 813 psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0, 814 814 psvcTable->pvService, SHFL_FN_LIST, … … 826 826 VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS }; 827 827 828 aParms[0].setUInt32(root);829 aParms[1].setUInt64(handle);830 aParms[2].setUInt32(fFlags);831 aParms[3].setUInt32(cb);832 aParms[4].setPointer(pInfo, cb);828 HGCMSvcSetU32(&aParms[0], root); 829 HGCMSvcSetU64(&aParms[1], handle); 830 HGCMSvcSetU32(&aParms[2], fFlags); 831 HGCMSvcSetU32(&aParms[3], cb); 832 HGCMSvcSetPv(&aParms[4], pInfo, cb); 833 833 psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0, 834 834 psvcTable->pvService, SHFL_FN_INFORMATION, … … 844 844 VBOXHGCMCALLHANDLE_TYPEDEF callHandle = { VINF_SUCCESS }; 845 845 846 aParms[0].setUInt32(root);847 aParms[1].setUInt64(handle);848 aParms[2].setUInt64(offLock);849 aParms[3].setUInt64(cbLock);850 aParms[4].setUInt32(fFlags);846 HGCMSvcSetU32(&aParms[0], root); 847 HGCMSvcSetU64(&aParms[1], handle); 848 HGCMSvcSetU64(&aParms[2], offLock); 849 HGCMSvcSetU64(&aParms[3], cbLock); 850 HGCMSvcSetU32(&aParms[4], fFlags); 851 851 psvcTable->pfnCall(psvcTable->pvService, &callHandle, 0, 852 852 psvcTable->pvService, SHFL_FN_LOCK,
Note:
See TracChangeset
for help on using the changeset viewer.