home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / nivb_src / sap.frm < prev    next >
Text File  |  1993-06-03  |  10KB  |  309 lines

  1. VERSION 2.00
  2. Begin Form SAPForm 
  3.    Caption         =   "Service Advertising Protocol Services Test"
  4.    Height          =   4005
  5.    Left            =   1035
  6.    LinkTopic       =   "Form1"
  7.    ScaleHeight     =   3600
  8.    ScaleWidth      =   7125
  9.    Top             =   1140
  10.    Width           =   7245
  11.    Begin Frame Frame1 
  12.       Caption         =   "Nearest Services"
  13.       Height          =   2895
  14.       Left            =   120
  15.       TabIndex        =   1
  16.       Top             =   120
  17.       Width           =   6855
  18.       Begin Label NACSHCLabel 
  19.          Height          =   255
  20.          Left            =   5640
  21.          TabIndex        =   28
  22.          Top             =   2520
  23.          Width           =   495
  24.       End
  25.       Begin Label NACSLabel 
  26.          Height          =   255
  27.          Left            =   2280
  28.          TabIndex        =   27
  29.          Top             =   2520
  30.          Width           =   2775
  31.       End
  32.       Begin Label Label11 
  33.          Alignment       =   1  'Right Justify
  34.          Caption         =   "NACS:"
  35.          Height          =   255
  36.          Left            =   1560
  37.          TabIndex        =   26
  38.          Top             =   2520
  39.          Width           =   615
  40.       End
  41.       Begin Label AdverPrintServerHCLabel 
  42.          Height          =   255
  43.          Left            =   5640
  44.          TabIndex        =   25
  45.          Top             =   2280
  46.          Width           =   495
  47.       End
  48.       Begin Label RemoteBridgeHCLabel 
  49.          Height          =   255
  50.          Left            =   5640
  51.          TabIndex        =   24
  52.          Top             =   2040
  53.          Width           =   495
  54.       End
  55.       Begin Label ArchiveServerHCLabel 
  56.          Height          =   255
  57.          Left            =   5640
  58.          TabIndex        =   23
  59.          Top             =   1800
  60.          Width           =   495
  61.       End
  62.       Begin Label PrintServerHCLabel 
  63.          Height          =   255
  64.          Left            =   5640
  65.          TabIndex        =   22
  66.          Top             =   1560
  67.          Width           =   495
  68.       End
  69.       Begin Label JobServerHCLabel 
  70.          Height          =   255
  71.          Left            =   5640
  72.          TabIndex        =   21
  73.          Top             =   1320
  74.          Width           =   495
  75.       End
  76.       Begin Label FileServerHCLabel 
  77.          Height          =   255
  78.          Left            =   5640
  79.          TabIndex        =   20
  80.          Top             =   1080
  81.          Width           =   495
  82.       End
  83.       Begin Label PrintQueueHCLabel 
  84.          Height          =   255
  85.          Left            =   5640
  86.          TabIndex        =   19
  87.          Top             =   840
  88.          Width           =   495
  89.       End
  90.       Begin Label AdverPrintServerLabel 
  91.          Height          =   255
  92.          Left            =   2280
  93.          TabIndex        =   18
  94.          Top             =   2280
  95.          Width           =   2775
  96.       End
  97.       Begin Label RemoteBridgeLabel 
  98.          Height          =   255
  99.          Left            =   2280
  100.          TabIndex        =   17
  101.          Top             =   2040
  102.          Width           =   2775
  103.       End
  104.       Begin Label ArchiveServerLabel 
  105.          Height          =   255
  106.          Left            =   2280
  107.          TabIndex        =   16
  108.          Top             =   1800
  109.          Width           =   2775
  110.       End
  111.       Begin Label PrintServerLabel 
  112.          Height          =   255
  113.          Left            =   2280
  114.          TabIndex        =   15
  115.          Top             =   1560
  116.          Width           =   2775
  117.       End
  118.       Begin Label JobServerLabel 
  119.          Height          =   255
  120.          Left            =   2280
  121.          TabIndex        =   14
  122.          Top             =   1320
  123.          Width           =   2775
  124.       End
  125.       Begin Label FileServerLabel 
  126.          Height          =   255
  127.          Left            =   2280
  128.          TabIndex        =   13
  129.          Top             =   1080
  130.          Width           =   2775
  131.       End
  132.       Begin Label Label10 
  133.          Caption         =   "Hop Count"
  134.          Height          =   255
  135.          Left            =   5400
  136.          TabIndex        =   12
  137.          Top             =   360
  138.          Width           =   1095
  139.       End
  140.       Begin Label Label9 
  141.          Caption         =   "Service Name"
  142.          Height          =   255
  143.          Left            =   2760
  144.          TabIndex        =   11
  145.          Top             =   360
  146.          Width           =   1335
  147.       End
  148.       Begin Label Label1 
  149.          Caption         =   "Service Type"
  150.          Height          =   255
  151.          Left            =   1080
  152.          TabIndex        =   10
  153.          Top             =   360
  154.          Width           =   1215
  155.       End
  156.       Begin Label Label2 
  157.          Alignment       =   1  'Right Justify
  158.          Caption         =   "Print queue:"
  159.          Height          =   255
  160.          Left            =   960
  161.          TabIndex        =   9
  162.          Top             =   840
  163.          Width           =   1215
  164.       End
  165.       Begin Label Label3 
  166.          Alignment       =   1  'Right Justify
  167.          Caption         =   "File server:"
  168.          Height          =   255
  169.          Left            =   1080
  170.          TabIndex        =   8
  171.          Top             =   1080
  172.          Width           =   1095
  173.       End
  174.       Begin Label Label4 
  175.          Alignment       =   1  'Right Justify
  176.          Caption         =   "Job server:"
  177.          Height          =   255
  178.          Left            =   1200
  179.          TabIndex        =   7
  180.          Top             =   1320
  181.          Width           =   975
  182.       End
  183.       Begin Label Label5 
  184.          Alignment       =   1  'Right Justify
  185.          Caption         =   "Print server:"
  186.          Height          =   255
  187.          Left            =   1080
  188.          TabIndex        =   6
  189.          Top             =   1560
  190.          Width           =   1095
  191.       End
  192.       Begin Label Label6 
  193.          Alignment       =   1  'Right Justify
  194.          Caption         =   "Archive server:"
  195.          Height          =   255
  196.          Left            =   360
  197.          TabIndex        =   5
  198.          Top             =   1800
  199.          Width           =   1815
  200.       End
  201.       Begin Label Label7 
  202.          Alignment       =   1  'Right Justify
  203.          Caption         =   "Remote bridge server:"
  204.          Height          =   255
  205.          Left            =   240
  206.          TabIndex        =   4
  207.          Top             =   2040
  208.          Width           =   1935
  209.       End
  210.       Begin Label Label8 
  211.          Alignment       =   1  'Right Justify
  212.          Caption         =   "Advertising print server:"
  213.          Height          =   255
  214.          Left            =   120
  215.          TabIndex        =   3
  216.          Top             =   2280
  217.          Width           =   2055
  218.       End
  219.       Begin Label PrintQueueLabel 
  220.          Height          =   255
  221.          Left            =   2280
  222.          TabIndex        =   2
  223.          Top             =   840
  224.          Width           =   2775
  225.       End
  226.    End
  227.    Begin CommandButton OKButton 
  228.       Caption         =   "&OK"
  229.       Height          =   375
  230.       Left            =   3000
  231.       TabIndex        =   0
  232.       Top             =   3120
  233.       Width           =   855
  234.    End
  235. End
  236.  
  237. Sub Form_Load ()
  238.     Dim nearestService As SAP
  239.  
  240.     ccode% = QueryServices(3, OT_PRINT_QUEUE, Len(nearestService), nearestService)
  241.     If (ccode% <> SUCCESSFUL) Then
  242.         PrintQueueLabel.Caption = "No response"
  243.     Else
  244.         PrintQueueLabel.Caption = nearestService.serverName
  245.         PrintQueueHCLabel.Caption = nearestService.interveningNetworks
  246.     End If
  247.     
  248.     ccode% = QueryServices(3, OT_FILE_SERVER, Len(nearestService), nearestService)
  249.     If (ccode% <> SUCCESSFUL) Then
  250.         FileServerLabel.Caption = "No response"
  251.     Else
  252.         FileServerLabel.Caption = nearestService.serverName
  253.         FileServerHCLabel.Caption = nearestService.interveningNetworks
  254.     End If
  255.     
  256.     ccode% = QueryServices(3, OT_JOB_SERVER, Len(nearestService), nearestService)
  257.     If (ccode% <> SUCCESSFUL) Then
  258.         JobServerLabel.Caption = "No response"
  259.     Else
  260.         JobServerLabel.Caption = nearestService.serverName
  261.         JobServerHCLabel.Caption = nearestService.interveningNetworks
  262.     End If
  263.     
  264.     ccode% = QueryServices(3, OT_PRINT_SERVER, Len(nearestService), nearestService)
  265.     If (ccode% <> SUCCESSFUL) Then
  266.         PrintServerLabel.Caption = "No response"
  267.     Else
  268.         PrintServerLabel.Caption = nearestService.serverName
  269.         PrintServerHCLabel.Caption = nearestService.interveningNetworks
  270.     End If
  271.     
  272.     ccode% = QueryServices(3, OT_ARCHIVE_SERVER, Len(nearestService), nearestService)
  273.     If (ccode% <> SUCCESSFUL) Then
  274.         ArchiveServerLabel.Caption = "No response"
  275.     Else
  276.         ArchiveServerLabel.Caption = nearestService.serverName
  277.         ArchiveServerHCLabel.Caption = nearestService.interveningNetworks
  278.     End If
  279.     
  280.     ccode% = QueryServices(3, OT_REMOTE_BRIDGE_SERVER, Len(nearestService), nearestService)
  281.     If (ccode% <> SUCCESSFUL) Then
  282.         RemoteBridgeLabel.Caption = "No response"
  283.     Else
  284.         RemoteBridgeLabel.Caption = nearestService.serverName
  285.         RemoteBridgeHCLabel.Caption = nearestService.interveningNetworks
  286.     End If
  287.     
  288.     ccode% = QueryServices(3, OT_ADVERTISING_PRINT_SERVER, Len(nearestService), nearestService)
  289.     If (ccode% <> SUCCESSFUL) Then
  290.         AdverPrintServerLabel.Caption = "No response"
  291.     Else
  292.         AdverPrintServerLabel.Caption = nearestService.serverName
  293.         AdverPrintServerHCLabel.Caption = nearestService.interveningNetworks
  294.     End If
  295.     
  296.     ccode% = QueryServices(3, OT_NACS, Len(nearestService), nearestService)
  297.     If (ccode% <> SUCCESSFUL) Then
  298.         NACSLabel.Caption = "No response"
  299.     Else
  300.         NACSLabel.Caption = nearestService.serverName
  301.         NACSHCLabel.Caption = nearestService.interveningNetworks
  302.     End If
  303. End Sub
  304.  
  305. Sub OKButton_Click ()
  306.     Unload SAPForm
  307. End Sub
  308.  
  309.