Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlSrv_FsGetDiskList Function
PHT_SERVER  Example

Returns a list of root directories on the host computer.

Syntax
PRL_HANDLE PrlSrv_FsGetDiskList(
    PRL_HANDLE hServer
);
File

PrlApiDisp.h

Parameters

hServer
A handle of type PHT_SERVER identifying the Parallels Service.

Returns

A handle of type PHT_JOB containing the results of this asynchronous operation or PRL_INVALID_HANDLE if there's not enough memory to instantiate the job object. 

 

Remarks

On Windows, the function returns a list of PHT_REMOTE_FILESYSTEM_INFO objects containing the disk volume information (e.g. C:\, D:\, etc.). On other operating systems, it returns a single object containing the root directory. 

To get the return code from the PHT_JOB object, use the PrlJob_GetRetCode function. Possible values are: 

PRL_ERR_INVALID_ARG - invalid server handle was passed. 

PRL_ERR_SUCCESS - function completed successfully. 

To get the results from the PHT_JOB object:

  1. Use the PrlJob_GetResult function to obtain a handle to the PHT_RESULT object.
  2. Use the PrlResult_GetParamsCount to get the number of results.
  3. Use the PrlResult_GetParamByIndex function to get individual results.
Example

The following example illustrates how to obtain a handle of type PHT_REMOTE_FILESYSTEM_INFO.

hJob =
PrlSrv_FsGetDiskList( hServer );
PrlJob_Wait( hJob, JOB_TIMEOUT );
PrlJob_GetResult( hJob, &hJobResult );
PrlHandle_Free( hJob );

// Get the PHT_REMOTE_FILESYSTEM_INFO handle.
PRL_HANDLE hHandle;
PrlResult_GetParam( hJobResult, &hHandle );
Links
© 2021 Parallels International GmbH. All rights reserved.