Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlSrvCfg_GetHostname Function
PHT_SERVER_CONFIG

Returns the hostname of the specified host or guest.

Syntax
PRL_RESULT PrlSrvCfg_GetHostname(
    PRL_HANDLE hSrvConfig, 
    PRL_STR sHostname, 
    PRL_UINT32_PTR pnHostnameBufLength
);
File

PrlApiDisp.h

Parameters

hSrvConfig
A handle of type PHT_SERVER_CONFIG. When obtaining the host OS information, use the PrlSrv_GetSrvConfig to obtain the handle. When obtaining the guest OS information, use the PrlVmGuest_GetNetworkSettings function.
sHostname
[out] A pointer to a buffer that receives the result (a UTF-8 encoded, null-terminated string).
pnHostnameBufLength
[in] The size of the output buffer (in bytes). Set the buffer pointer to null and this parameter's value to zero to receive the required size. [out] The required output buffer size.

Returns

PRL_RESULT. Possible values are: 

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed. 

PRL_ERR_BUFFER_OVERRUN - the size of the output buffer is not large enough. The parameter that is used to specify the size will contain the required size. 

PRL_ERR_SUCCESS - function completed successfully. 

Links
© 2021 Parallels International GmbH. All rights reserved.