Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlSrv_Create Function
PHT_SERVER  Example  See Also

Creates a new handle of type PHT_SERVER.

Syntax
PRL_RESULT PrlSrv_Create(
    PRL_HANDLE_PTR handle
);
File

PrlApiDisp.h

Parameters

handle
[out] A pointer to a variable that receives the handle.

Returns

PRL_RESULT. Possible values: 

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed. 

PRL_ERR_SUCCESS - function completed successfully. 

Remarks

In order to establish a connection with a Parallels Service, a handle of type PHT_SERVER must be created and the object that the handle references must be populated with the Parallels Service connection information. Once a connection is established, the handle can be used to access the Parallels Service. It is the responsibility of the caller to free the handle with the PrlHandle_Free call when it is no longer needed.

See Also
Example

The following example illustrates how to create a handle of type PHT_SERVER.

PRL_HANDLE hServer;

PRL_RESULT ret = PrlSrv_Create( &hServer );
if ( PRL_FAILED(ret) )
{
    printf( "PrlSrv_Create returned with error: %s\n",
    PRL_RESULT_TO_STRING(ret) );
}

// Free hServer handle when it's no longer needed.
PrlHandle_Free( hServer );
Links
© 2021 Parallels International GmbH. All rights reserved.