mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-14 15:52:47 -05:00
winfsp-tests: mount-test
This commit is contained in:
@ -5,16 +5,29 @@
|
||||
void mount_dotest(PWSTR DeviceName)
|
||||
{
|
||||
NTSTATUS Result;
|
||||
BOOLEAN Success;
|
||||
FSP_FSCTL_VOLUME_PARAMS Params;
|
||||
WCHAR VolumePath[MAX_PATH];
|
||||
HANDLE VolumeHandle;
|
||||
|
||||
Params.SectorSize = 65536;
|
||||
//Result = FspFsctlCreateVolume(DeviceName, &Params, );
|
||||
Params.SectorSize = (UINT16)65536;
|
||||
Result = FspFsctlCreateVolume(DeviceName, &Params, 0, VolumePath, sizeof VolumePath);
|
||||
ASSERT(STATUS_SUCCESS == Result);
|
||||
|
||||
Result = FspFsctlOpenVolume(VolumePath, &VolumeHandle);
|
||||
ASSERT(STATUS_SUCCESS == Result);
|
||||
|
||||
Result = FspFsctlDeleteVolume(VolumeHandle);
|
||||
ASSERT(STATUS_SUCCESS == Result);
|
||||
|
||||
Success = CloseHandle(VolumeHandle);
|
||||
ASSERT(Success);
|
||||
}
|
||||
|
||||
void mount_test(void)
|
||||
{
|
||||
mount_dotest("WinFsp.Disk");
|
||||
mount_dotest("WinFsp.Net");
|
||||
mount_dotest(L"WinFsp.Disk");
|
||||
//mount_dotest(L"WinFsp.Net");
|
||||
}
|
||||
|
||||
void mount_tests(void)
|
||||
|
Reference in New Issue
Block a user