SetMacAddress
Top  Previous  Next

Description

Assigns the specified MAC address to the virtual camera.

[C++]
int
 SetMacAddress(const char* mac);


Parameters
[C/C++]

[in] const char* mac  
String specifying the MAC address of the virtual camera in the IEEE-802 format (six groups of two hexadecimal digits separated by hyphens)  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_INVALIDARG  
Wrong MAC format  
 

Example


This command sets the MAC address of the camera to a specified value:

m_pCamera->SetMacAddress("AB-AC-AD-AE-AF-00");  
 

Remarks

If you are connecting several virtual camera devices to the same network interface (see SetIpAddress for more details), you have to make sure that each device is assigned a unique MAC address. One way to do it is by implementing a counter of instances of your application in the system and setting a MAC address of an instance based on its ordinal number.

Note that the camera must be in the disconnected state in order for this method to work.

By default the MAC address of a virtual camera object is preset to AA-00-00-00-00-00.