1 Module IP_Assigner_Example
3 Function
Main() As Integer
4 Dim rc As Integer =
Examples.GALIL_EXAMPLE_OK
5 Dim
gclib As Gclib = New Gclib()
6 Dim args() As String = Environment.GetCommandLineArgs()
8 If args.Count() <> 3 Then
9 Console.WriteLine("Incorrect number of arguments provided")
10 Console.WriteLine("Usage: ip_assigner_example.exe <SERIAL
#> <1 Byte Address>")
12 Console.Write(vbCrLf + "Press any key to close the example.")
14 Return Examples.GALIL_EXAMPLE_ERROR
17 Dim serial_num As String = args(1)
19 Dim ok As Boolean = Byte.TryParse(args(2), address)
22 Console.WriteLine("Please enter a number between 0 and 255 for the address.\n" +
23 " This will be used as the last number in the IP Address\n" +
24 "Usage: ip_assigner_example.exe <SERIAL #> <1 Byte Address>")
26 Console.Write(vbCrLf + "Press any key to close the example.")
28 Return Examples.GALIL_EXAMPLE_ERROR
31 rc = Examples.IP_Assigner(gclib, serial_num, address)
33 Examples.PrintError(gclib, ex)
34 rc = Examples.GALIL_EXAMPLE_ERROR
39 Console.Write(vbCrLf + "Press any key to close the example.")
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...