home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / NW_BIND2 / NWBIND.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-06-21  |  19.5 KB  |  555 lines

  1. VERSION 2.00
  2. Begin Form WinBindBrow 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "WinBindBrow"
  6.    ClientHeight    =   6990
  7.    ClientLeft      =   255
  8.    ClientTop       =   1140
  9.    ClientWidth     =   6570
  10.    Height          =   7680
  11.    Icon            =   NWBIND.FRX:0000
  12.    Left            =   195
  13.    LinkMode        =   1  'Source
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    ScaleHeight     =   6990
  17.    ScaleWidth      =   6570
  18.    Top             =   510
  19.    Width           =   6690
  20.    Begin Frame Frame1 
  21.       Caption         =   "&Display Style"
  22.       Height          =   1005
  23.       Left            =   1620
  24.       TabIndex        =   8
  25.       Top             =   5850
  26.       Width           =   3435
  27.       Begin OptionButton optDispType 
  28.          Caption         =   "&Set"
  29.          Height          =   285
  30.          Index           =   3
  31.          Left            =   1800
  32.          TabIndex        =   12
  33.          Top             =   630
  34.          Width           =   1545
  35.       End
  36.       Begin OptionButton optDispType 
  37.          Caption         =   "&Hex Dump"
  38.          Height          =   285
  39.          Index           =   1
  40.          Left            =   90
  41.          TabIndex        =   10
  42.          Top             =   630
  43.          Width           =   1545
  44.       End
  45.       Begin OptionButton optDispType 
  46.          Caption         =   "No&rmal"
  47.          Height          =   285
  48.          Index           =   0
  49.          Left            =   90
  50.          TabIndex        =   9
  51.          Top             =   270
  52.          Width           =   1545
  53.       End
  54.       Begin OptionButton optDispType 
  55.          Caption         =   "&Enhanced"
  56.          Height          =   285
  57.          Index           =   2
  58.          Left            =   1800
  59.          TabIndex        =   11
  60.          Top             =   270
  61.          Width           =   1545
  62.       End
  63.    End
  64.    Begin TextBox txtPropertyValue 
  65.       FontBold        =   0   'False
  66.       FontItalic      =   0   'False
  67.       FontName        =   "Terminal"
  68.       FontSize        =   9
  69.       FontStrikethru  =   0   'False
  70.       FontUnderline   =   0   'False
  71.       Height          =   2175
  72.       Left            =   180
  73.       MultiLine       =   -1  'True
  74.       ScrollBars      =   3  'Both
  75.       TabIndex        =   7
  76.       Text            =   "Text1"
  77.       Top             =   3600
  78.       Width           =   6345
  79.    End
  80.    Begin PictureBox picPropSec 
  81.       FontBold        =   0   'False
  82.       FontItalic      =   0   'False
  83.       FontName        =   "MS Sans Serif"
  84.       FontSize        =   8.25
  85.       FontStrikethru  =   0   'False
  86.       FontUnderline   =   0   'False
  87.       Height          =   1095
  88.       Left            =   4230
  89.       ScaleHeight     =   1065
  90.       ScaleWidth      =   2235
  91.       TabIndex        =   14
  92.       TabStop         =   0   'False
  93.       Top             =   2250
  94.       Width           =   2265
  95.    End
  96.    Begin ListBox lbProperty 
  97.       Height          =   1005
  98.       Left            =   180
  99.       Sorted          =   -1  'True
  100.       TabIndex        =   5
  101.       Top             =   2250
  102.       Width           =   3975
  103.    End
  104.    Begin PictureBox picObjSec 
  105.       FontBold        =   0   'False
  106.       FontItalic      =   0   'False
  107.       FontName        =   "MS Sans Serif"
  108.       FontSize        =   8.25
  109.       FontStrikethru  =   0   'False
  110.       FontUnderline   =   0   'False
  111.       Height          =   1005
  112.       Left            =   4230
  113.       ScaleHeight     =   975
  114.       ScaleWidth      =   2235
  115.       TabIndex        =   13
  116.       TabStop         =   0   'False
  117.       Top             =   900
  118.       Width           =   2265
  119.    End
  120.    Begin ListBox lbObject 
  121.       Height          =   1005
  122.       Left            =   180
  123.       Sorted          =   -1  'True
  124.       TabIndex        =   3
  125.       Top             =   900
  126.       Width           =   3975
  127.    End
  128.    Begin ComboBox cmbObjType 
  129.       Height          =   300
  130.       Left            =   180
  131.       Sorted          =   -1  'True
  132.       TabIndex        =   1
  133.       Text            =   "Combo1"
  134.       Top             =   270
  135.       Width           =   4245
  136.    End
  137.    Begin Label lblControl 
  138.       Caption         =   "&Value:"
  139.       Height          =   195
  140.       Index           =   3
  141.       Left            =   180
  142.       TabIndex        =   6
  143.       Top             =   3330
  144.       Width           =   1545
  145.    End
  146.    Begin Label lblControl 
  147.       Caption         =   "&Properties:"
  148.       Height          =   195
  149.       Index           =   2
  150.       Left            =   180
  151.       TabIndex        =   4
  152.       Top             =   1980
  153.       Width           =   1545
  154.    End
  155.    Begin Label lblControl 
  156.       Caption         =   "Object &Names:"
  157.       Height          =   195
  158.       Index           =   1
  159.       Left            =   180
  160.       TabIndex        =   2
  161.       Top             =   630
  162.       Width           =   1545
  163.    End
  164.    Begin Label lblControl 
  165.       Caption         =   "Object &Types:"
  166.       Height          =   195
  167.       Index           =   0
  168.       Left            =   180
  169.       TabIndex        =   0
  170.       Top             =   0
  171.       Width           =   1545
  172.    End
  173.    Begin Menu MNU_File 
  174.       Caption         =   "&File"
  175.       Begin Menu MNU_FileSave 
  176.          Caption         =   "&Save"
  177.       End
  178.       Begin Menu MNU_FileAbout 
  179.          Caption         =   "&About"
  180.       End
  181.       Begin Menu MNU_FileExit 
  182.          Caption         =   "E&xit"
  183.       End
  184.    End
  185.    Begin Menu MNU_Options 
  186.       Caption         =   "&Options"
  187.       Begin Menu MNU_OptionsSel 
  188.          Caption         =   "&Auto Switch"
  189.          Checked         =   -1  'True
  190.          Index           =   0
  191.       End
  192.       Begin Menu MNU_OptionsSel 
  193.          Caption         =   "&Prompt for save"
  194.          Checked         =   -1  'True
  195.          Index           =   1
  196.       End
  197.    End
  198. DefInt A-Z
  199. ' Feel free to use or modify NWBIND.
  200. ' Address any questions or comments to
  201. ' Scott Johnston, CIS: 72677,1570 MHS: ScottJ@Alta
  202. 'This program will scan the bindery of a netware file server
  203. 'v1.5 6-21-1994 changed declares to 'new' nwNetAPI
  204. '               made the code look a little better
  205. Declare Function GetConnectionInformation Lib "NWNetAPI.dll" (ByVal Conn&, ByVal UserID As String, ObjType%, ObjID&, ByVal LoginTime As String) As Integer
  206. Declare Function GetConnectionNumber Lib "NWNetAPI.dll" () As Long
  207. Declare Function ScanBinderyObject Lib "NWNetAPI.dll" (ByVal SObjName$, ByVal SObjType%, LastObjID&, ByVal ObjName$, ObjType%, ObjProp%, ObjFlag%, ObjSec%) As Integer
  208. Declare Function ScanProperty Lib "NWNetAPI.dll" (ByVal SObjName$, ByVal SObjType%, ByVal SPropName$, SeqNum&, ByVal PropName$, PropFlag%, PropSec%, PropVal%, PropMore%) As Integer
  209. Declare Function ReadPropertyValue Lib "NWNetAPI.dll" (ByVal SObjName$, ByVal SObjType%, ByVal SPropName$, ByVal Segment%, ByVal PropValue$, PropValMore%, PropValFlag%) As Integer
  210. Declare Function GetBinderyObjectName Lib "NWNetAPI.dll" (ByVal SObjID&, ByVal ObjName$, ObjType%)
  211. Dim FileName$
  212. Dim CR$
  213. Dim Zero$
  214. Dim TabC$
  215. Sub cmbObjType_Click ()
  216.     UpdateList
  217.     cmbObjType.Tag = Str$(cmbObjType.ListIndex)
  218.     If lbObject.ListCount > 0 Then
  219.         lbObject.ListIndex = 0
  220.     End If
  221. End Sub
  222. Sub cmbObjType_KeyPress (KeyAscii As Integer)
  223.     If KeyAscii = 13 Then
  224.         If InStr(cmbObjType.Text, " - ") > 0 Then
  225.             UpdateObjs (cmbObjType.Text)
  226.         End If
  227.         UpdateList
  228.         KeyAscii = 0
  229.         cmbObjType.SelStart = 0
  230.         cmbObjType.SelLength = Len(cmbObjType.Text)
  231.     End If
  232. End Sub
  233. Sub DispObjInfo (ObjProp%, ObjFlag%, ObjSec%)
  234.     picObjSec.Cls
  235.     WSec$ = GetSecurity$(Int(ObjSec% / 16))
  236.     RSec$ = GetSecurity$((ObjSec% And &HF))
  237.     picObjSec.Print "Object Security:" + TabC$ + TabC$ + Hex$(ObjSec%)
  238.     picObjSec.Print "Write: " + TabC$ + WSec$
  239.     picObjSec.Print "Read:  " + TabC$ + RSec$
  240.     If ObjFlag% = 0 Then
  241.         picObjSec.Print "Static  " + TabC$ + TabC$ + TabC$ + Hex$(ObjFlag%)
  242.     Else
  243.         picObjSec.Print "Dynamic" + TabC$ + TabC$ + Hex$(ObjFlag%)
  244.     End If
  245.     If ObjProp% = 0 Then
  246.         picObjSec.Print "No properties" + TabC$ + TabC$ + Hex$(ObjProp%)
  247.     Else
  248.         picObjSec.Print "Object has properties" + TabC$ + Hex$(ObjProp%)
  249.     End If
  250. End Sub
  251. Sub DispProp (Property$, PropFlag%)
  252.     'displays to properly formatted property
  253.     HexDisp% = Val(txtPropertyValue.Tag)
  254.     Select Case HexDisp%
  255.         Case 0  'normal string
  256.             DispProperty$ = Property$
  257.         Case 1  'display hex dump of the property value
  258.             Temp$ = Property$
  259.             IntCount% = 1
  260.             For i% = 1 To Len(Temp$)
  261.                 HexCode$ = Hex$(Asc(Mid$(Temp$, i%, 1)))
  262.                 If Len(HexCode$) = 1 Then HexCode$ = "0" + HexCode$
  263.                 HexCode$ = HexCode$ + " "
  264.                 HStr$ = HStr$ + HexCode$
  265.                 If IntCount% = 16 Then
  266.                     HStr$ = HStr$ + CR$
  267.                     IntCount% = 1
  268.                 Else
  269.                     IntCount% = IntCount% + 1
  270.                 End If
  271.             Next i%
  272.             DispProperty$ = HStr$
  273.         Case 2  'display as text,  but ignore nulls
  274.             PropHold$ = Property$
  275.             For i% = 1 To Len(PropHold$)
  276.                 If Mid$(PropHold$, i%, 1) = Zero$ Then
  277.                     Prop$ = Prop$ + "_"
  278.                 Else
  279.                     Prop$ = Prop$ + Mid$(PropHold$, i%, 1)
  280.                 End If
  281.             Next i%
  282.             DispProperty$ = Prop$
  283.         Case 3  'display as list of members of set
  284.             ObjectCount% = 1
  285.             Do  'get all the names of the object ids in the set
  286.                 ObjID$ = Mid$(Property$, ObjectCount%, 4)
  287.                 If Len(ObjID$) = 0 Then Exit Do
  288.                 ObjHex$ = ""
  289.                 If ObjID$ = String$(4, Chr$(0)) Then Exit Do
  290.                 For i% = 1 To 4
  291.                     HexCode$ = Hex$(Asc(Mid$(ObjID$, i%, 1)))
  292.                     If Len(HexCode$) = 1 Then HexCode$ = "0" + HexCode$
  293.                     ObjHex$ = ObjHex$ + HexCode$
  294.                 Next i%
  295.                 SetObjID& = (Val("&h" + ObjHex$))
  296.                 OName$ = Space$(50)
  297.                 Ret% = GetBinderyObjectName(SetObjID&, OName$, OType%)
  298.                 ObjTy$ = FindObjDesc$(OType%)
  299.                 ONameT$ = GetCString$(OName$)
  300.                 If Len(ONameT$) = 0 Then
  301.                     ONameT$ = "Unknown Object"
  302.                 Else
  303.                     ONameT$ = ONameT$ + " - " + ObjTy$ + " (" + Hex$(OType%) + ")"
  304.                     
  305.                 End If
  306.                 SetProp$ = SetProp$ + ONameT$ + Chr$(13) + Chr$(10)
  307.                 ObjectCount% = ObjectCount% + 4
  308.             Loop
  309.             DispProperty$ = SetProp$
  310.     End Select
  311.     txtPropertyValue.Text = DispProperty$
  312. End Sub
  313. Sub DispPropInfo (PropFlag%, PropSec%, PropHasVal%, PropMore%)
  314.     picPropSec.Cls
  315.     picPropSec.Print "Property Security" + TabC$ + Hex$(PropSec%)
  316.     picPropSec.Print "Write" + TabC$ + GetSecurity$(Int(PropSec% / &H10))
  317.     picPropSec.Print "Read" + TabC$ + GetSecurity$(PropSec% And &HF)
  318.     If (PropFlag% And 1) = 1 Then
  319.         picPropSec.Print "Dynamic" + TabC$ + TabC$ + Hex$(PropFlag%)
  320.     Else
  321.         picPropSec.Print "Static" + TabC$ + TabC$ + TabC$ + Hex$(PropFlag%)
  322.     End If
  323.     If (PropFlag% And 2) = 2 Then
  324.         picPropSec.Print "Set"
  325.     Else
  326.         picPropSec.Print "Item"
  327.     End If
  328.     If PropHasVal% = 0 Then
  329.         picPropSec.Print "Property has no value" + TabC$ + Hex$(PropHasVal%)
  330.     Else
  331.         picPropSec.Print "Property has value" + TabC$ + Hex$(PropHasVal%)
  332.     End If
  333. End Sub
  334. Function FindObjDesc$ (ObjType%)
  335.     For i% = 0 To cmbObjType.ListCount - 1
  336.         If Val("&H" + cmbObjType.List(i%)) = ObjType% Then
  337.             FindObjDesc$ = ReadFromDash$((cmbObjType.List(i%)))
  338.             Exit For
  339.         End If
  340.     Next i%
  341. End Function
  342. Sub Form_Load ()
  343.     CR$ = Chr$(13) + Chr$(10)
  344.     Zero$ = Chr$(0)
  345.     TabC$ = Chr$(9)
  346.     optDispType(0).Value = 1       'set to normal disp
  347.     If Len(Command$) > 0 Then
  348.         FileName$ = Command$
  349.     Else
  350.         FileName$ = "NWBind.Dat"
  351.     End If
  352.     LoadObjTypes FileName$
  353.     ObjName$ = Space$(50)
  354.     LastSeen& = -1
  355.     Do  'scan all objects to get all object types
  356.         Ret% = ScanBinderyObject("*", -1, LastSeen&, ObjName$, ObjType%, Properties%, Flag%, Security%)
  357.         For i% = 0 To cmbObjType.ListCount - 1
  358.             If Val("&H" + cmbObjType.List(i%)) = ObjType% Then Exit For
  359.         Next i%
  360.         If i% = cmbObjType.ListCount Then
  361.             AddStr$ = Hex$(ObjType%)
  362.             If Len(AddStr$) < 4 Then AddStr$ = String$(4 - Len(AddStr$), "0") + AddStr$
  363.             AddStr$ = AddStr$ + " - Unknown Object Type"
  364.             cmbObjType.AddItem AddStr$
  365.         End If
  366.     Loop While Ret% = 0
  367.     picObjSec.Height = picObjSec.TextHeight("X") * 5
  368.     picPropSec.Height = picPropSec.TextHeight("X") * 6
  369.     Show
  370.     cmbObjType.ListIndex = 0
  371.     UserInfo
  372. End Sub
  373. Sub Form_Unload (Cancel As Integer)
  374.     If MNU_OptionsSel(1).Checked Then
  375.         WriteChanges% = MsgBox("Write object types to " + FileName$ + "?", 35, "Windows Bindery Browser")
  376.         Select Case WriteChanges%
  377.             Case 2
  378.                 Cancel = 1
  379.                 Exit Sub
  380.             Case 6
  381.                 WriteEmOut FileName$
  382.         End Select
  383.     End If
  384. End Sub
  385. Function GetCString$ (ByVal Text$)
  386.     ZeroPos = InStr(Text$, Zero$)
  387.     If ZeroPos > 0 Then ZeroPos = ZeroPos - 1
  388.     GetCString$ = Left$(Text$, ZeroPos)
  389. End Function
  390. Function GetSecurity$ (Sec%)
  391.     Select Case Sec%
  392.         Case 0
  393.             T$ = "Anyone"
  394.         Case 1
  395.             T$ = "Logged"
  396.         Case 2
  397.             T$ = "Object"
  398.         Case 3
  399.             T$ = "Supervisor"
  400.         Case 4
  401.             T$ = "Netware"
  402.         Case Else
  403.             T$ = "Invalid -" + Hex$(Sec%)
  404.     End Select
  405.     GetSecurity$ = T$
  406. End Function
  407. Sub lbObject_Click ()
  408.     lbProperty.Clear
  409.     Prop$ = Space$(256)
  410.     SearchProp$ = "*"
  411.     SearchObjName$ = lbObject.List(lbObject.ListIndex)
  412.     SearchObjType% = Val("&H" + (cmbObjType.Text))
  413.     LastProp& = -1
  414.     ObjName$ = Space$(50)
  415.     Ret% = ScanBinderyObject(SearchObjName$, SearchObjType%, -1, ObjName$, ObjType%, ObjProp%, ObjFlag%, ObjSec%)
  416.     If Ret% = 0 Then
  417.         DispObjInfo ObjProp%, ObjFlag%, ObjSec%
  418.         Do  'scan for all properties of this object
  419.             Ret% = ScanProperty(SearchObjName$, SearchObjType%, SearchProp$, LastProp&, Prop$, PropFlag%, PropSec%, PropHasVal%, PropMore%)
  420.             If Ret% = 0 Then lbProperty.AddItem GetCString$(Prop$)
  421.         Loop While Ret% = 0
  422.         If lbProperty.ListCount > 0 Then
  423.             lbProperty.ListIndex = 0
  424.         End If
  425.     Else
  426.         MsgBox "ScanBinderyObject returned: " + Hex$(Ret%), 16, "Windows Bindery Browser"
  427.     End If
  428. End Sub
  429. Sub lbProperty_Click ()
  430.     SearchProp$ = lbProperty.List(lbProperty.ListIndex)
  431.     SearchObjName$ = lbObject.List(lbObject.ListIndex)
  432.     SearchObjType% = Val("&H" + cmbObjType.Text)
  433.     Prop$ = Space$(50)
  434.     Ret% = ScanProperty(SearchObjName$, SearchObjType%, SearchProp$, -1, Prop$, PropFlag%, PropSec%, PropHasVal%, PropMore%)
  435.     DispPropInfo PropFlag%, PropSec%, PropHasVal%, PropMore%
  436.     If (PropFlag% And 2) = 2 Then
  437.         If Not Val(txtPropertyValue.Tag) = 3 And MNU_OptionsSel(0).Checked = -1 Then
  438.             optDispType(3).Value = -1
  439.         End If
  440.     Else
  441.         If Not Val(txtPropertyValue.Tag) = 1 And MNU_OptionsSel(0).Checked = -1 Then
  442.             optDispType(0).Value = -1
  443.         End If
  444.     End If
  445.     ReadProperty PropV$, PropType%
  446.     DispProp PropV$, PropType%
  447. End Sub
  448. Sub LoadObjTypes (FileName$)
  449.     'load list of defined object types
  450.     FileNum% = FreeFile
  451.     Open FileName$ For Binary As FileNum%
  452.     lDataFile# = Len(FileNum%)
  453.     Close FileNum%
  454.     If lDataFile# > 0 Then
  455.         Open FileName$ For Input As FileNum%
  456.         While Not EOF(FileNum%)
  457.             Input #FileNum%, ObjType%, ObjTypeDesc$
  458.             SObjType$ = Hex$(ObjType%)
  459.             If Len(SObjType$) < 4 Then SObjType$ = String$(4 - Len(SObjType$), "0") + SObjType$
  460.             LoadStr$ = SObjType$ + " - " + ObjTypeDesc$
  461.             cmbObjType.AddItem LoadStr$
  462.         Wend
  463.         Close FileNum%
  464.     Else
  465.         Kill FileName$
  466.     End If
  467. End Sub
  468. Sub MNU_FileAbout_Click ()
  469.     CR$ = Chr$(13)
  470.     AStr$ = "Scott Johnston" + CR$
  471.     AStr$ = AStr$ + "Alta Enterprises" + CR$
  472. '    AStr$ = AStr$ + "1-14-92 v1.3"
  473.     AStr$ = AStr$ + "6-21-94 v1.5"
  474.     MsgBox AStr$, 0, "Windows Bindery Browser"
  475. End Sub
  476. Sub MNU_FileExit_Click ()
  477.     Unload WinBindBrow
  478. End Sub
  479. Sub MNU_FileSave_Click ()
  480.     WriteEmOut "NWBIND.DAT"
  481. End Sub
  482. Sub MNU_OptionsSel_Click (Index As Integer)
  483.     MNU_OptionsSel(Index).Checked = Not MNU_OptionsSel(Index).Checked
  484. End Sub
  485. Sub optDispType_Click (Index As Integer)
  486.     txtPropertyValue.Tag = Str$(Index)
  487.     ReadProperty PropV$, PropType%
  488.     DispProp PropV$, PropType%
  489. End Sub
  490. Function ReadFromDash$ (Text$)
  491.     ReadFromDash$ = Mid$(Text$, InStr(Text$, "-") + 1)
  492. End Function
  493. Sub ReadProperty (PropV$, PropType%)
  494.     PropV$ = ""
  495.     PropValue$ = Space$(128)
  496.     SearchProp$ = lbProperty.List(lbProperty.ListIndex)
  497.     SearchObjName$ = lbObject.List(lbObject.ListIndex)
  498.     SearchObjType% = Val("&H" + cmbObjType.Text)
  499.     Segment% = 1
  500.     Do          'read all property value segments for this property
  501.         Ret% = ReadPropertyValue(SearchObjName$, SearchObjType%, SearchProp$, Segment%, PropValue$, PropMore%, PropFlag%)
  502.         Segment% = Segment% + 1
  503.         If Ret% = 0 Then
  504.             PropV$ = PropV$ + PropValue$
  505.         End If
  506.     Loop While Ret% = 0 And PropMore% <> 0
  507.     PropType% = PropFlag% And &HF
  508. End Sub
  509. Sub UpdateList ()
  510.     lbObject.Clear
  511.     lbProperty.Clear
  512.     txtPropertyValue.Text = ""
  513.     SearchObjType% = Val("&h" + cmbObjType.Text)
  514.     LastSeen& = -1
  515.     ObjName$ = Space$(50)
  516.     Do  'scan for all objects of this object type
  517.         Ret% = ScanBinderyObject("*", SearchObjType%, LastSeen&, ObjName$, ObjType%, ObjProp%, ObjFlag%, ObjSec%)
  518.         If Ret% = 0 Then
  519.             AddString$ = GetCString$(ObjName$)
  520.             lbObject.AddItem AddString$
  521.         End If
  522.     Loop While Ret% = 0
  523. End Sub
  524. Sub UpdateObjs (NewDesc$)
  525.     NewObj% = Val("&H" + NewDesc$)
  526.     ObjStr$ = Hex$(NewObj%)
  527.     If Len(ObjStr$) < 4 Then ObjStr$ = String$(4 - Len(ObjStr$), "0") + ObjStr$
  528.     ObjDesc$ = Mid$(NewDesc$, InStr(NewDesc$, "-") + 1)
  529.     ObjDesc$ = RTrim$(LTrim$(ObjDesc$))
  530.     cmbObjType.RemoveItem Val(cmbObjType.Tag)
  531.     cmbObjType.AddItem ObjStr$ + " - " + ObjDesc$
  532.     cmbObjType.Text = ObjStr$ + " - " + ObjDesc$
  533.     cmbObjType.ListIndex = Val(cmbObjType.Tag)
  534. End Sub
  535. Sub UserInfo ()
  536.     OurConn& = GetConnectionNumber()            'get our connection number
  537.     OurName$ = Space$(50)
  538.     OurLogin$ = Space$(7)
  539.     'get our connection numbers information
  540.     Ret% = GetConnectionInformation(OurConn&, OurName$, OurType%, OurObjID&, OurLogin$)
  541.     OurName$ = GetCString$(OurName$)
  542.     caption = "Windows Bindery Browser - User: " + OurName$
  543. End Sub
  544. Sub WriteEmOut (FileName$)
  545.     FileNum = FreeFile
  546.     Open FileName$ For Output As FileNum
  547.     For i% = 0 To cmbObjType.ListCount - 1
  548.         ObjType% = Val("&H" + cmbObjType.List(i%))
  549.         ObjDesc$ = ReadFromDash$((cmbObjType.List(i%)))
  550.         ObjDesc$ = LTrim$(ObjDesc$)
  551.         Write #FileNum, ObjType%, ObjDesc$
  552.     Next i%
  553.     Close #FileNum
  554. End Sub
  555.