Creates a new handle of type PHT_SERVER.
PRL_RESULT PrlSrv_Create( PRL_HANDLE_PTR handle );
PrlApiDisp.h
PRL_RESULT. Possible values:
PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed.
PRL_ERR_SUCCESS - function completed successfully.
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.
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 );