Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I shutdown the DataSocket Server in Visual Basic

I am trying to programmatically shutdown the datasocket server. I tried sending the WM_CLOSE message but he just hides.

Do I have to get rough with him and use TerminateProcess?
0 Kudos
Message 1 of 2
(3,471 Views)
The DataSocket Server is actually an ActiveX Automation Server, and using this functionality is the best way to accomplish what you are asking. To access this in Visual Basic you can either add a reference to the "National Instruments DataSocket Server x.x" library and bind it to your app early or dynamically bind it so that you can create an object of type cwDataServer, and call its Show, Hide, and Close methods. I have included a project that shows exactly how to do this.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 2 of 2
(3,471 Views)