Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlVmDevNet_SetMacAddress Function
PHT_VIRTUAL_DEV_NET_ADAPTER  See Also

Allows to manually set MAC address to a network adapter inside a virtual machine.

Syntax
PRL_RESULT PrlVmDevNet_SetMacAddress(
    PRL_HANDLE hVmDev, 
    PRL_CONST_STR sNewMacAddress
);
File

PrlApiVm.h

Parameters

hVmDev
A handle of type PHT_VIRTUAL_DEV_NET_ADAPTER identifying the virtual network adapter.
sNewMacAddress
The new MAC address. The specified string must be encoded using UTF-8 and must be terminated with a binary zero character. The MAC address value cannot contain any delimiters. The following is an example of a valid MAC address: "001731EE6FBC".

Returns

PRL_RESULT. Possible values: 

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed. 

PRL_ERR_SUCCESS - function completed successfully. 

Remarks

Use this function if you would like to set a specific MAC address to an adapter. To generate an address and to set it to an adapter automatically, use the PrlVmDevNet_GenerateMacAddr function.

See Also
Links
© 2021 Parallels International GmbH. All rights reserved.