CA_ServerLockActiveObject
HRESULT CA_ServerLockActiveObject (CAServerObjHandle serverObjectHandle);
Purpose
Locks the ActiveX object whose handle is passed in the first parameter.
This action basically results in an additional reference to the ActiveX object, apart from the references held by the ActiveX clients. The effect is that the object does not get destroyed even when all the client references to the object are released.
This function is meant to be called when an ActiveX object that has a user interface is made visible on the screen.
Parameters
Input | ||
Name | Type | Description |
serverObjectHandle | CAServerObjHandle | The handle to an ActiveX object in your ActiveX server. |
Return Value
Name | Type | Description | ||
status | HRESULT | A value indicating whether an error occurred. Function failure is indicated by a negative error code. Error codes are defined in CVIversion\include\cviauto.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h. The LabWindows/CVI ActiveX Library explicitly returns error codes. Other error codes in winerror.h are generated by the COM runtime and passed on to you by the ActiveX Library. You can use CA_GetAutomationErrorString to get the description of an error code or CA_DisplayErrorInfo to display the description of the error code.
The error codes defined in <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h are too numerous to display here. These error codes can be returned to your ActiveX clients. |
Additional Information
Library: ActiveX Library
Include file: cviauto.h
LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later