WiseMo Guest Component API
Disk drives

Back to Index

This page describes param to InvokeRmOperation call and returned value from OnRmOperationResult for snapinId = 15001.

Note

When operation fails, OnRmOperationResult comes with non-zero status and Error object in value:

{
"Error" : {
"code" : 4101,
"message" : "Failed to send RM command"
}
}


When status is zero, value is as provided in following documentation.

Paged output

RM requests may yield lots of data so responses are restricted in size.
That's where StartAt, UpTo and Total are used.


StartAt


UpTo says which StartAt use next to continue data retrieval


Total says how many data at all. When UpTo equals to Total, then all data has been retrieved.

Operation: Check if supported

snapinId=15001 opId=0

Check if host supports Disk drives subsystem (Snap-In) for RM calls.

Parameters

{}

Returns

{
"Supported" : 1
}


Supported 1 if supports, 0 if not

Operation: Get drives

snapinId=15001 opId=201

Parameters

{"StartAt":-1}

Returns

{
"Drives" : [
{
"BytesSector" : 0,
"DisplayName" : "3? Floppy (A:)",
"DriveName" : "A:\\",
"DriveType" : "3?-Inch Floppy Disk",
"DriveTypeDW" : 2,
"FSType" : "",
"FreeClusters" : 0,
"FreeSpaceInBytesHi" : 0,
"FreeSpaceInBytesLo" : 0,
"InfoReq" : 0,
"SectorsPerCluster" : 0,
"SerialNo" : "0000-0000",
"SizeInBytesHi" : 0,
"SizeInBytesLo" : 0,
"SysFlags" : 0,
"TotalClusters" : 0,
"VolumeName" : ""
},
{
"BytesSector" : 512,
"DisplayName" : "System (C:)",
"DriveName" : "C:\\",
"DriveType" : "Local Disk",
"DriveTypeDW" : 3,
"FSType" : "NTFS",
"FreeClusters" : 4298844,
"FreeSpaceInBytesHi" : 4,
"FreeSpaceInBytesLo" : 428195840,
"InfoReq" : 1,
"SectorsPerCluster" : 8,
"SerialNo" : "7C94-4C30",
"SizeInBytesHi" : 12,
"SizeInBytesLo" : 2146758656,
"SysFlags" : 459007,
"TotalClusters" : 13107023,
"VolumeName" : "System"
}, ...
],
"StartAt" : -1,
"Total" : 3,
"UpTo" : 3
}

InfoReq in response items indicates whether details on that particular drive have been queried.
SizeInBytesHi,SizeInBytesLo: drive size as SizeInBytesHi*2^32 + SizeInBytesLo (bytes)
FreeSpaceInBytesHi,FreeSpaceInBytesLo: drive free space, same algorithm


Slow drives such as removable and CD-ROMs are not queried, InfoReq is 0 for them.
To get details on them use DDS_GET_DRIVE_INFO operation.

Operation: Get drive info

snapinId=15001 opId=202

This operation can be used to get details on removable and CD-ROM drives, which is not returned with Get drives operation.
Data format is the same, except Drives array contains only one item.

Parameters

{"DriveName":"C:\\"}

Returns

{
"Drive" : {
"BytesSector" : 512,
"DisplayName" : "System (C:)",
"DriveName" : "C:\\",
"DriveType" : "Local Disk",
"DriveTypeDW" : 3,
"FSType" : "NTFS",
"FreeClusters" : 4298860,
"FreeSpaceInBytesHi" : 4,
"FreeSpaceInBytesLo" : 428261376,
"InfoReq" : 1,
"SectorsPerCluster" : 8,
"SerialNo" : "2090093616",
"SizeInBytesHi" : 12,
"SizeInBytesLo" : 2146758656,
"SysFlags" : 459007,
"TotalClusters" : 13107023,
"VolumeName" : "System"
}
}


SizeInBytesHi, SizeInBytesLo: drive size as SizeInBytesHi*2^32 + SizeInBytesLo (bytes)
FreeSpaceInBytesHi, FreeSpaceInBytesLo: drive free space, same algorithm