home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / nw_bind2 / nwbind.frm < prev    next >
Text File  |  1994-06-21  |  20KB  |  605 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. End
  199. DefInt A-Z
  200.  
  201. ' Feel free to use or modify NWBIND.
  202. ' Address any questions or comments to
  203. ' Scott Johnston, CIS: 72677,1570 MHS: ScottJ@Alta
  204.  
  205. 'This program will scan the bindery of a netware file server
  206. 'v1.5 6-21-1994 changed declares to 'new' nwNetAPI
  207. '               made the code look a little better
  208. '
  209.  
  210. Declare Function GetConnectionInformation Lib "NWNetAPI.dll" (ByVal Conn&, ByVal UserID As String, ObjType%, ObjID&, ByVal LoginTime As String) As Integer
  211. Declare Function GetConnectionNumber Lib "NWNetAPI.dll" () As Long
  212. Declare Function ScanBinderyObject Lib "NWNetAPI.dll" (ByVal SObjName$, ByVal SObjType%, LastObjID&, ByVal ObjName$, ObjType%, ObjProp%, ObjFlag%, ObjSec%) As Integer
  213. Declare Function ScanProperty Lib "NWNetAPI.dll" (ByVal SObjName$, ByVal SObjType%, ByVal SPropName$, SeqNum&, ByVal PropName$, PropFlag%, PropSec%, PropVal%, PropMore%) As Integer
  214. Declare Function ReadPropertyValue Lib "NWNetAPI.dll" (ByVal SObjName$, ByVal SObjType%, ByVal SPropName$, ByVal Segment%, ByVal PropValue$, PropValMore%, PropValFlag%) As Integer
  215. Declare Function GetBinderyObjectName Lib "NWNetAPI.dll" (ByVal SObjID&, ByVal ObjName$, ObjType%)
  216.  
  217.  
  218. Dim FileName$
  219. Dim CR$
  220. Dim Zero$
  221. Dim TabC$
  222.  
  223. Sub cmbObjType_Click ()
  224.     UpdateList
  225.     cmbObjType.Tag = Str$(cmbObjType.ListIndex)
  226.     If lbObject.ListCount > 0 Then
  227.         lbObject.ListIndex = 0
  228.     End If
  229. End Sub
  230.  
  231. Sub cmbObjType_KeyPress (KeyAscii As Integer)
  232.     If KeyAscii = 13 Then
  233.         If InStr(cmbObjType.Text, " - ") > 0 Then
  234.             UpdateObjs (cmbObjType.Text)
  235.         End If
  236.         UpdateList
  237.         KeyAscii = 0
  238.         cmbObjType.SelStart = 0
  239.         cmbObjType.SelLength = Len(cmbObjType.Text)
  240.     End If
  241. End Sub
  242.  
  243. Sub DispObjInfo (ObjProp%, ObjFlag%, ObjSec%)
  244.     picObjSec.Cls
  245.     WSec$ = GetSecurity$(Int(ObjSec% / 16))
  246.     RSec$ = GetSecurity$((ObjSec% And &HF))
  247.     picObjSec.Print "Object Security:" + TabC$ + TabC$ + Hex$(ObjSec%)
  248.     picObjSec.Print "Write: " + TabC$ + WSec$
  249.     picObjSec.Print "Read:  " + TabC$ + RSec$
  250.     If ObjFlag% = 0 Then
  251.         picObjSec.Print "Static  " + TabC$ + TabC$ + TabC$ + Hex$(ObjFlag%)
  252.     Else
  253.         picObjSec.Print "Dynamic" + TabC$ + TabC$ + Hex$(ObjFlag%)
  254.     End If
  255.     If ObjProp% = 0 Then
  256.         picObjSec.Print "No properties" + TabC$ + TabC$ + Hex$(ObjProp%)
  257.     Else
  258.         picObjSec.Print "Object has properties" + TabC$ + Hex$(ObjProp%)
  259.     End If
  260.  
  261. End Sub
  262.  
  263. Sub DispProp (Property$, PropFlag%)
  264.     'displays to properly formatted property
  265.     HexDisp% = Val(txtPropertyValue.Tag)
  266.     Select Case HexDisp%
  267.         Case 0  'normal string
  268.             DispProperty$ = Property$
  269.         Case 1  'display hex dump of the property value
  270.             Temp$ = Property$
  271.             IntCount% = 1
  272.             For i% = 1 To Len(Temp$)
  273.                 HexCode$ = Hex$(Asc(Mid$(Temp$, i%, 1)))
  274.                 If Len(HexCode$) = 1 Then HexCode$ = "0" + HexCode$
  275.                 HexCode$ = HexCode$ + " "
  276.                 HStr$ = HStr$ + HexCode$
  277.                 If IntCount% = 16 Then
  278.                     HStr$ = HStr$ + CR$
  279.                     IntCount% = 1
  280.                 Else
  281.                     IntCount% = IntCount% + 1
  282.                 End If
  283.             Next i%
  284.             DispProperty$ = HStr$
  285.         Case 2  'display as text,  but ignore nulls
  286.             PropHold$ = Property$
  287.             For i% = 1 To Len(PropHold$)
  288.                 If Mid$(PropHold$, i%, 1) = Zero$ Then
  289.                     Prop$ = Prop$ + "_"
  290.                 Else
  291.                     Prop$ = Prop$ + Mid$(PropHold$, i%, 1)
  292.                 End If
  293.             Next i%
  294.             DispProperty$ = Prop$
  295.         Case 3  'display as list of members of set
  296.             ObjectCount% = 1
  297.             Do  'get all the names of the object ids in the set
  298.                 ObjID$ = Mid$(Property$, ObjectCount%, 4)
  299.                 If Len(ObjID$) = 0 Then Exit Do
  300.                 ObjHex$ = ""
  301.                 If ObjID$ = String$(4, Chr$(0)) Then Exit Do
  302.                 For i% = 1 To 4
  303.                     HexCode$ = Hex$(Asc(Mid$(ObjID$, i%, 1)))
  304.                     If Len(HexCode$) = 1 Then HexCode$ = "0" + HexCode$
  305.                     ObjHex$ = ObjHex$ + HexCode$
  306.                 Next i%
  307.                 SetObjID& = (Val("&h" + ObjHex$))
  308.                 OName$ = Space$(50)
  309.                 Ret% = GetBinderyObjectName(SetObjID&, OName$, OType%)
  310.                 ObjTy$ = FindObjDesc$(OType%)
  311.                 ONameT$ = GetCString$(OName$)
  312.                 If Len(ONameT$) = 0 Then
  313.                     ONameT$ = "Unknown Object"
  314.                 Else
  315.                     ONameT$ = ONameT$ + " - " + ObjTy$ + " (" + Hex$(OType%) + ")"
  316.                     
  317.                 End If
  318.                 SetProp$ = SetProp$ + ONameT$ + Chr$(13) + Chr$(10)
  319.                 ObjectCount% = ObjectCount% + 4
  320.             Loop
  321.             DispProperty$ = SetProp$
  322.     End Select
  323.     txtPropertyValue.Text = DispProperty$
  324.  
  325. End Sub
  326.  
  327. Sub DispPropInfo (PropFlag%, PropSec%, PropHasVal%, PropMore%)
  328.     picPropSec.Cls
  329.     picPropSec.Print "Property Security" + TabC$ + Hex$(PropSec%)
  330.     picPropSec.Print "Write" + TabC$ + GetSecurity$(Int(PropSec% / &H10))
  331.     picPropSec.Print "Read" + TabC$ + GetSecurity$(PropSec% And &HF)
  332.     If (PropFlag% And 1) = 1 Then
  333.         picPropSec.Print "Dynamic" + TabC$ + TabC$ + Hex$(PropFlag%)
  334.     Else
  335.         picPropSec.Print "Static" + TabC$ + TabC$ + TabC$ + Hex$(PropFlag%)
  336.     End If
  337.     If (PropFlag% And 2) = 2 Then
  338.         picPropSec.Print "Set"
  339.     Else
  340.         picPropSec.Print "Item"
  341.     End If
  342.     If PropHasVal% = 0 Then
  343.         picPropSec.Print "Property has no value" + TabC$ + Hex$(PropHasVal%)
  344.     Else
  345.         picPropSec.Print "Property has value" + TabC$ + Hex$(PropHasVal%)
  346.     End If
  347.  
  348. End Sub
  349.  
  350. Function FindObjDesc$ (ObjType%)
  351.     For i% = 0 To cmbObjType.ListCount - 1
  352.         If Val("&H" + cmbObjType.List(i%)) = ObjType% Then
  353.             FindObjDesc$ = ReadFromDash$((cmbObjType.List(i%)))
  354.             Exit For
  355.         End If
  356.     Next i%
  357. End Function
  358.  
  359. Sub Form_Load ()
  360.     CR$ = Chr$(13) + Chr$(10)
  361.     Zero$ = Chr$(0)
  362.     TabC$ = Chr$(9)
  363.     optDispType(0).Value = 1       'set to normal disp
  364.     
  365.     If Len(Command$) > 0 Then
  366.         FileName$ = Command$
  367.     Else
  368.         FileName$ = "NWBind.Dat"
  369.     End If
  370.     LoadObjTypes FileName$
  371.  
  372.     ObjName$ = Space$(50)
  373.     LastSeen& = -1
  374.     Do  'scan all objects to get all object types
  375.         Ret% = ScanBinderyObject("*", -1, LastSeen&, ObjName$, ObjType%, Properties%, Flag%, Security%)
  376.         For i% = 0 To cmbObjType.ListCount - 1
  377.             If Val("&H" + cmbObjType.List(i%)) = ObjType% Then Exit For
  378.         Next i%
  379.         If i% = cmbObjType.ListCount Then
  380.             AddStr$ = Hex$(ObjType%)
  381.             If Len(AddStr$) < 4 Then AddStr$ = String$(4 - Len(AddStr$), "0") + AddStr$
  382.             AddStr$ = AddStr$ + " - Unknown Object Type"
  383.             cmbObjType.AddItem AddStr$
  384.         End If
  385.     Loop While Ret% = 0
  386.     picObjSec.Height = picObjSec.TextHeight("X") * 5
  387.     picPropSec.Height = picPropSec.TextHeight("X") * 6
  388.     Show
  389.     cmbObjType.ListIndex = 0
  390.     UserInfo
  391.     
  392. End Sub
  393.  
  394. Sub Form_Unload (Cancel As Integer)
  395.     If MNU_OptionsSel(1).Checked Then
  396.         WriteChanges% = MsgBox("Write object types to " + FileName$ + "?", 35, "Windows Bindery Browser")
  397.         Select Case WriteChanges%
  398.             Case 2
  399.                 Cancel = 1
  400.                 Exit Sub
  401.             Case 6
  402.                 WriteEmOut FileName$
  403.         End Select
  404.     End If
  405. End Sub
  406.  
  407. Function GetCString$ (ByVal Text$)
  408.     ZeroPos = InStr(Text$, Zero$)
  409.     If ZeroPos > 0 Then ZeroPos = ZeroPos - 1
  410.     GetCString$ = Left$(Text$, ZeroPos)
  411. End Function
  412.  
  413. Function GetSecurity$ (Sec%)
  414.     Select Case Sec%
  415.         Case 0
  416.             T$ = "Anyone"
  417.         Case 1
  418.             T$ = "Logged"
  419.         Case 2
  420.             T$ = "Object"
  421.         Case 3
  422.             T$ = "Supervisor"
  423.         Case 4
  424.             T$ = "Netware"
  425.         Case Else
  426.             T$ = "Invalid -" + Hex$(Sec%)
  427.     End Select
  428.     GetSecurity$ = T$
  429. End Function
  430.  
  431. Sub lbObject_Click ()
  432.  
  433.     lbProperty.Clear
  434.     Prop$ = Space$(256)
  435.     SearchProp$ = "*"
  436.     SearchObjName$ = lbObject.List(lbObject.ListIndex)
  437.     SearchObjType% = Val("&H" + (cmbObjType.Text))
  438.     LastProp& = -1
  439.     
  440.     ObjName$ = Space$(50)
  441.     Ret% = ScanBinderyObject(SearchObjName$, SearchObjType%, -1, ObjName$, ObjType%, ObjProp%, ObjFlag%, ObjSec%)
  442.     If Ret% = 0 Then
  443.         DispObjInfo ObjProp%, ObjFlag%, ObjSec%
  444.         Do  'scan for all properties of this object
  445.             Ret% = ScanProperty(SearchObjName$, SearchObjType%, SearchProp$, LastProp&, Prop$, PropFlag%, PropSec%, PropHasVal%, PropMore%)
  446.             If Ret% = 0 Then lbProperty.AddItem GetCString$(Prop$)
  447.         Loop While Ret% = 0
  448.         If lbProperty.ListCount > 0 Then
  449.             lbProperty.ListIndex = 0
  450.         End If
  451.     Else
  452.         MsgBox "ScanBinderyObject returned: " + Hex$(Ret%), 16, "Windows Bindery Browser"
  453.     End If
  454. End Sub
  455.  
  456. Sub lbProperty_Click ()
  457.     
  458.     SearchProp$ = lbProperty.List(lbProperty.ListIndex)
  459.     SearchObjName$ = lbObject.List(lbObject.ListIndex)
  460.     SearchObjType% = Val("&H" + cmbObjType.Text)
  461.     
  462.     Prop$ = Space$(50)
  463.     Ret% = ScanProperty(SearchObjName$, SearchObjType%, SearchProp$, -1, Prop$, PropFlag%, PropSec%, PropHasVal%, PropMore%)
  464.     DispPropInfo PropFlag%, PropSec%, PropHasVal%, PropMore%
  465.     If (PropFlag% And 2) = 2 Then
  466.         If Not Val(txtPropertyValue.Tag) = 3 And MNU_OptionsSel(0).Checked = -1 Then
  467.             optDispType(3).Value = -1
  468.         End If
  469.     Else
  470.         If Not Val(txtPropertyValue.Tag) = 1 And MNU_OptionsSel(0).Checked = -1 Then
  471.             optDispType(0).Value = -1
  472.         End If
  473.     End If
  474.     ReadProperty PropV$, PropType%
  475.     DispProp PropV$, PropType%
  476. End Sub
  477.  
  478. Sub LoadObjTypes (FileName$)
  479.     'load list of defined object types
  480.     FileNum% = FreeFile
  481.     Open FileName$ For Binary As FileNum%
  482.     lDataFile# = Len(FileNum%)
  483.     Close FileNum%
  484.     If lDataFile# > 0 Then
  485.         Open FileName$ For Input As FileNum%
  486.         While Not EOF(FileNum%)
  487.             Input #FileNum%, ObjType%, ObjTypeDesc$
  488.             SObjType$ = Hex$(ObjType%)
  489.             If Len(SObjType$) < 4 Then SObjType$ = String$(4 - Len(SObjType$), "0") + SObjType$
  490.  
  491.             LoadStr$ = SObjType$ + " - " + ObjTypeDesc$
  492.             cmbObjType.AddItem LoadStr$
  493.         Wend
  494.         Close FileNum%
  495.     Else
  496.         Kill FileName$
  497.     End If
  498. End Sub
  499.  
  500. Sub MNU_FileAbout_Click ()
  501.     CR$ = Chr$(13)
  502.     AStr$ = "Scott Johnston" + CR$
  503.     AStr$ = AStr$ + "Alta Enterprises" + CR$
  504. '    AStr$ = AStr$ + "1-14-92 v1.3"
  505.     AStr$ = AStr$ + "6-21-94 v1.5"
  506.     MsgBox AStr$, 0, "Windows Bindery Browser"
  507. End Sub
  508.  
  509. Sub MNU_FileExit_Click ()
  510.     Unload WinBindBrow
  511.  
  512. End Sub
  513.  
  514. Sub MNU_FileSave_Click ()
  515.     WriteEmOut "NWBIND.DAT"
  516. End Sub
  517.  
  518. Sub MNU_OptionsSel_Click (Index As Integer)
  519.     MNU_OptionsSel(Index).Checked = Not MNU_OptionsSel(Index).Checked
  520.  
  521. End Sub
  522.  
  523. Sub optDispType_Click (Index As Integer)
  524.     txtPropertyValue.Tag = Str$(Index)
  525.     ReadProperty PropV$, PropType%
  526.     DispProp PropV$, PropType%
  527.  
  528. End Sub
  529.  
  530. Function ReadFromDash$ (Text$)
  531.     ReadFromDash$ = Mid$(Text$, InStr(Text$, "-") + 1)
  532. End Function
  533.  
  534. Sub ReadProperty (PropV$, PropType%)
  535.     PropV$ = ""
  536.     PropValue$ = Space$(128)
  537.     SearchProp$ = lbProperty.List(lbProperty.ListIndex)
  538.     SearchObjName$ = lbObject.List(lbObject.ListIndex)
  539.     SearchObjType% = Val("&H" + cmbObjType.Text)
  540.     Segment% = 1
  541.     Do          'read all property value segments for this property
  542.         Ret% = ReadPropertyValue(SearchObjName$, SearchObjType%, SearchProp$, Segment%, PropValue$, PropMore%, PropFlag%)
  543.         Segment% = Segment% + 1
  544.         If Ret% = 0 Then
  545.             PropV$ = PropV$ + PropValue$
  546.         End If
  547.     Loop While Ret% = 0 And PropMore% <> 0
  548.     PropType% = PropFlag% And &HF
  549.  
  550. End Sub
  551.  
  552. Sub UpdateList ()
  553.  
  554.     lbObject.Clear
  555.     lbProperty.Clear
  556.     txtPropertyValue.Text = ""
  557.     SearchObjType% = Val("&h" + cmbObjType.Text)
  558.     LastSeen& = -1
  559.     ObjName$ = Space$(50)
  560.     Do  'scan for all objects of this object type
  561.         Ret% = ScanBinderyObject("*", SearchObjType%, LastSeen&, ObjName$, ObjType%, ObjProp%, ObjFlag%, ObjSec%)
  562.         If Ret% = 0 Then
  563.             AddString$ = GetCString$(ObjName$)
  564.             lbObject.AddItem AddString$
  565.         End If
  566.     Loop While Ret% = 0
  567. End Sub
  568.  
  569. Sub UpdateObjs (NewDesc$)
  570.     NewObj% = Val("&H" + NewDesc$)
  571.     ObjStr$ = Hex$(NewObj%)
  572.     If Len(ObjStr$) < 4 Then ObjStr$ = String$(4 - Len(ObjStr$), "0") + ObjStr$
  573.     ObjDesc$ = Mid$(NewDesc$, InStr(NewDesc$, "-") + 1)
  574.     ObjDesc$ = RTrim$(LTrim$(ObjDesc$))
  575.     cmbObjType.RemoveItem Val(cmbObjType.Tag)
  576.     cmbObjType.AddItem ObjStr$ + " - " + ObjDesc$
  577.     cmbObjType.Text = ObjStr$ + " - " + ObjDesc$
  578.     cmbObjType.ListIndex = Val(cmbObjType.Tag)
  579. End Sub
  580.  
  581. Sub UserInfo ()
  582.     OurConn& = GetConnectionNumber()            'get our connection number
  583.     OurName$ = Space$(50)
  584.     OurLogin$ = Space$(7)
  585.     'get our connection numbers information
  586.     Ret% = GetConnectionInformation(OurConn&, OurName$, OurType%, OurObjID&, OurLogin$)
  587.     
  588.     OurName$ = GetCString$(OurName$)
  589.     caption = "Windows Bindery Browser - User: " + OurName$
  590. End Sub
  591.  
  592. Sub WriteEmOut (FileName$)
  593.     FileNum = FreeFile
  594.     Open FileName$ For Output As FileNum
  595.     For i% = 0 To cmbObjType.ListCount - 1
  596.         ObjType% = Val("&H" + cmbObjType.List(i%))
  597.         ObjDesc$ = ReadFromDash$((cmbObjType.List(i%)))
  598.         ObjDesc$ = LTrim$(ObjDesc$)
  599.         Write #FileNum, ObjType%, ObjDesc$
  600.  
  601.     Next i%
  602.     Close #FileNum
  603. End Sub
  604.  
  605.