gclib  2.0.8
Communications API for Galil controllers and PLCs
Remote_Client_Example.vb
Go to the documentation of this file.
1 ''' <summary>
2 ''' Demonstrates various uses of GListServers() and GSetServer().
3 ''' </summary>
4 ''' <remarks>This example requires no command line arguments.</remarks>
5 Module Remote_Client_Example
6 
7  ''' <summary>
8  ''' Main function for the Remote Client example.
9  ''' </summary>
10  ''' <returns>The success status Or error code of the function.</returns>
11  ''' <remarks>This example requires no command line arguments.</remarks>
12  Function Main() As Integer
13  Dim rc As Integer = Examples.GALIL_EXAMPLE_OK
14  Try
15  rc = Examples.Remote_Client()
16  Catch ex As Exception
17  Console.WriteLine(ex.Message)
18  rc = Examples.GALIL_EXAMPLE_ERROR
19  End Try
20 
21  Console.Write(vbCrLf + "Press any key to close the example.")
22  Console.ReadKey()
23 
24  Return rc
25  End Function
26 
27 End Module
GCLIB_DLL_EXPORTED GReturn GCALL GListServers(GCStringOut servers, GSize servers_len)
Uses GUtility(), G_UTIL_GCAPS_LIST_SERVERS to provide a list of all available gcaps services on the l...
Definition: gclibo.c:169
GCLIB_DLL_EXPORTED GReturn GCALL GSetServer(GCStringIn server_name)
Uses GUtility(), G_UTIL_GCAPS_SET_SERVER to set the new active server.
Definition: gclibo.c:128
void error(GCon g, GReturn rc)
An example of error handling and debugging information.
Definition: examples.h:40
int Main()
partial Module Examples
Definition: Commands.vb:4
int Remote_Client()
Demonstrates various uses of GListServers() and GSetServer()