LabWindows/CVI

DS_ControlLocalServer

HRESULT DS_ControlLocalServer (DSEnum_ServerOps operation);

Purpose

Controls the DataSocket server application on the local machine.

You can launch or close the DataSocket server application, and you can control the visibility of its window.

Parameters

Input
Name Type Description
operation DSEnum_ServerOps A constant that indicates the operation to perform.

You can pass one of the following constants:

  • DSConst_ServerLaunch—Starts the local data socket server.
  • DSConst_ServerHide—Hides the local data socket server window.
  • DSConst_ServerShow—Shows the local data socket server window.
  • DSConst_ServerClose—Shuts down the local data socket server.
You can hide, show, or close the server only if you successfully launched the server by calling this function with DSConst_ServerLaunch.

Return Value

Name Type Description
status HRESULT The value that indicates whether an error occurred. A negative error code indicates function failure.

Error codes are defined in CVIversion\toolslib\datasock\dataskt.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h. Other error codes in winerror.h are generated by ActiveX Servers and are passed on to you by the DataSocket Library.

Additional Information

Library: DataSocket Library

Include file: datasock\dataskt.h

LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later

Example

Refer to userint\databinding.cws for an example of using the DS_ControlLocalServer function.

Log in to get a better experience