SetControlKey
Top  Previous  Next

Description

Sets the numerical access key for the Control with Switchover access to the camera. Used in combination with the Privilege property set to 4.

Syntax


[VB]
objActiveGige.SetControlKey Value


[C/C++]
HRESULT SetControlKey(long Value);


Data Types
[VB]

Value: Long


Parameters
[C/C++]

Value [in]  
The 16-bit integer access key.  


Return Values

S_OK  
Success  
E_FAIL  
Failure.  

Example


This VB example shows a simple application that takes the control over the camera by submitting a predefined access key.

Private Sub Form_Load()  
ActiveGige1.Multicast=True  
ActiveGige1.SetControlKey "1234"  
ActiveGige1.Privilege=2  
ActiveGige1.Acquire=True  
End Sub  
 

Remarks


When a primary application issues the SetControlKey command followed by setting the Privilege property to 4, the camera will be assigned the Control with Switchover access with a corresponding key code, provided the camera supports this type of access. When a secondary applications issues the SetControlKey command followed by setting the Privilege property to 4, it will become a primary application as long as the control key code is correct and the camera supports the Control with Switchover access.

When the primary control over the camera is switched to another application, the application that previously controlled the camera will be sent a message with Event ID #7 that can be used to perform a set of actions associated with the lost of primary control. For more information refer to "GigE Vision Video Streaming and Device Control Over Ethernet Standard" published by the Automated Imaging Association.