Collapse All
Virtuozzo Virtualization SDK C API Reference
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 Virtuozzo Service, a handle of type PHT_SERVER must be created and the object that the handle references must be populated with the Virtuozzo Service connection information. Once a connection is established, the handle can be used to access the Virtuozzo 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
Copyright ©2016-2017 Parallels International GmbH. All rights reserved.