5 ''' <returns>The success status Or
error code of the function.</returns>
6 ''' <remarks>See remote_client_example.cs for an example.</remarks>
8 Dim
gclib = New Gclib()
10 Console.WriteLine("<s> List available servers on the network" + vbNewLine +
11 "<h> List available hardware on currently connected server" + vbNewLine +
12 "<0-9> Enter numbers 0-9 to connect to a server by index" + vbNewLine +
13 "<l> Set active server back to local server" + vbNewLine +
17 Dim servers_list As String() = Array.Empty(Of String)
20 Dim input As Char = Console.ReadKey(True).KeyChar
24 ElseIf input = "s" Then
25 Console.WriteLine("Available Servers:")
27 Print_Servers_List(servers_list)
28 ElseIf input >= "0" And input <= "9" Then
29 Dim index As Integer = Convert.ToInt16(input) - Convert.ToInt16("0"c)
30 If servers_list.Length > 0 And index < servers_list.Length Then
32 Console.WriteLine("Server set to: " + servers_list(index))
34 ElseIf input = "l" Then
36 Console.WriteLine("Server set to: Local")
37 ElseIf input = "h" Then
40 For Each address As String In addresses
41 Console.WriteLine(address)
49 Private Sub Print_Servers_List(servers_list As String())
50 If servers_list.Length = 0 Then
51 Console.WriteLine("none")
53 For i As Integer = 0 To servers_list.Length - 1
54 Console.WriteLine("<" + i.ToString() + "> " + servers_list(i))
Provides a class of shared constants and methods for gclib's example projects.
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
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...
GCLIB_DLL_EXPORTED GReturn GCALL GSetServer(GCStringIn server_name)
Uses GUtility(), G_UTIL_GCAPS_SET_SERVER to set the new active server.
GCLIB_DLL_EXPORTED GReturn GCALL GAddresses(GCStringOut addresses, GSize addresses_len)
Uses GUtility(), G_UTIL_GCAPS_ADDRESSES or G_UTIL_ADDRESSES to provide a listing of all available con...
void error(GCon g, GReturn rc)
An example of error handling and debugging information.
int Remote_Client()
Demonstrates various uses of GListServers() and GSetServer()