VERSION 5.00
Begin VB.Form Form30 
   Caption         =   " Singlix FS Sub Directory Descriptors"
   ClientHeight    =   4830
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4065
   Icon            =   "direntries.frx":0000
   LinkTopic       =   "Form30"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4830
   ScaleWidth      =   4065
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdLast 
      DownPicture     =   "direntries.frx":0442
      Height          =   345
      Left            =   3510
      MaskColor       =   &H00FFFFFF&
      Picture         =   "direntries.frx":0562
      Style           =   1  'Graphical
      TabIndex        =   35
      ToolTipText     =   "Last"
      Top             =   4320
      UseMaskColor    =   -1  'True
      Width           =   315
   End
   Begin VB.CommandButton cmdNext 
      DownPicture     =   "direntries.frx":0682
      Height          =   345
      Left            =   3180
      MaskColor       =   &H00FFFFFF&
      Picture         =   "direntries.frx":07BE
      Style           =   1  'Graphical
      TabIndex        =   34
      ToolTipText     =   "Next"
      Top             =   4320
      UseMaskColor    =   -1  'True
      Width           =   315
   End
   Begin VB.CommandButton cmdPrev 
      DownPicture     =   "direntries.frx":08FA
      Height          =   345
      Left            =   2850
      MaskColor       =   &H00FFFFFF&
      Picture         =   "direntries.frx":0A36
      Style           =   1  'Graphical
      TabIndex        =   33
      ToolTipText     =   "Previous"
      Top             =   4320
      UseMaskColor    =   -1  'True
      Width           =   315
   End
   Begin VB.CommandButton cmdFirst 
      DownPicture     =   "direntries.frx":0B72
      Height          =   345
      Left            =   2520
      MaskColor       =   &H00FFFFFF&
      Picture         =   "direntries.frx":0CAE
      Style           =   1  'Graphical
      TabIndex        =   32
      ToolTipText     =   "First"
      Top             =   4320
      UseMaskColor    =   -1  'True
      Width           =   315
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 16:"
      Height          =   255
      Index           =   15
      Left            =   120
      TabIndex        =   31
      Top             =   3840
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   15
      Left            =   1800
      TabIndex        =   30
      Top             =   3840
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 15:"
      Height          =   375
      Index           =   14
      Left            =   120
      TabIndex        =   29
      Top             =   3600
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   14
      Left            =   1800
      TabIndex        =   28
      Top             =   3600
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 14:"
      Height          =   255
      Index           =   13
      Left            =   120
      TabIndex        =   27
      Top             =   3360
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   13
      Left            =   1800
      TabIndex        =   26
      Top             =   3360
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 13:"
      Height          =   255
      Index           =   12
      Left            =   120
      TabIndex        =   25
      Top             =   3120
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   12
      Left            =   1800
      TabIndex        =   24
      Top             =   3120
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 12:"
      Height          =   255
      Index           =   11
      Left            =   120
      TabIndex        =   23
      Top             =   2880
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   11
      Left            =   1800
      TabIndex        =   22
      Top             =   2880
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 11:"
      Height          =   255
      Index           =   10
      Left            =   120
      TabIndex        =   21
      Top             =   2640
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   10
      Left            =   1800
      TabIndex        =   20
      Top             =   2640
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 10:"
      Height          =   255
      Index           =   9
      Left            =   120
      TabIndex        =   19
      Top             =   2400
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   9
      Left            =   1800
      TabIndex        =   18
      Top             =   2400
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 9:"
      Height          =   255
      Index           =   8
      Left            =   120
      TabIndex        =   17
      Top             =   2160
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   8
      Left            =   1800
      TabIndex        =   16
      Top             =   2160
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 8:"
      Height          =   255
      Index           =   7
      Left            =   120
      TabIndex        =   15
      Top             =   1920
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   7
      Left            =   1800
      TabIndex        =   14
      Top             =   1920
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 7:"
      Height          =   255
      Index           =   6
      Left            =   120
      TabIndex        =   13
      Top             =   1680
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   6
      Left            =   1800
      TabIndex        =   12
      Top             =   1680
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 6:"
      Height          =   255
      Index           =   5
      Left            =   120
      TabIndex        =   11
      Top             =   1440
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   5
      Left            =   1800
      TabIndex        =   10
      Top             =   1440
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 5:"
      Height          =   255
      Index           =   4
      Left            =   120
      TabIndex        =   9
      Top             =   1200
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   4
      Left            =   1800
      TabIndex        =   8
      Top             =   1200
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 4:"
      Height          =   255
      Index           =   3
      Left            =   120
      TabIndex        =   7
      Top             =   960
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   3
      Left            =   1800
      TabIndex        =   6
      Top             =   960
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 3:"
      Height          =   255
      Index           =   2
      Left            =   120
      TabIndex        =   5
      Top             =   720
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   2
      Left            =   1800
      TabIndex        =   4
      Top             =   720
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 2:"
      Height          =   255
      Index           =   1
      Left            =   120
      TabIndex        =   3
      Top             =   480
      Width           =   1605
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   0
      Left            =   1800
      TabIndex        =   2
      Top             =   240
      Width           =   1995
   End
   Begin VB.Label Label23 
      Caption         =   "0"
      Height          =   255
      Index           =   1
      Left            =   1800
      TabIndex        =   1
      Top             =   480
      Width           =   1995
   End
   Begin VB.Label Label1 
      Caption         =   "Directory Entry 1:"
      Height          =   255
      Index           =   0
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   1605
   End
End
Attribute VB_Name = "Form30"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim X As Integer
Dim Y As Integer
Dim Z As Integer
Dim EntryDescriptorNo As Long

Private Sub cmdFirst_Click()
If Y <> 0 Then
   Y = 0
   Call ShowEntries
Else
   Beep
End If
End Sub

Private Sub cmdLast_Click()
If Y <> 7 Then
   Y = 7
   Call ShowEntries
Else
   Beep
End If
End Sub

Private Sub cmdNext_Click()
If Y < 7 Then
   Y = Y + 1
   Call ShowEntries
Else
   Beep
End If
End Sub

Private Sub cmdPrev_Click()
If Y > 0 Then
   Y = Y - 1
   Call ShowEntries
Else
   Beep
End If
End Sub

Private Sub Form_Activate()
Call ShowEntries
End Sub

Private Sub ShowEntries()
Rem 18/01/2010 bugfix for deleted entry
On Error GoTo InvalidDirEntryDescriptorNo
Z = 0
For X = 64 * Y To (64 * Y) + 63 Step 4
    EntryDescriptorNo = (CLng((BSBuffer(X + 3)) * 16777216) + (CLng(BSBuffer(X + 2)) * 65536) + (CLng(BSBuffer(X + 1)) * 256) + CLng(BSBuffer(X)))
    Label1(Z).Caption = "Directory Entry " + CStr(Z + 1) + ":"
    Label23(Z).Caption = CStr(EntryDescriptorNo)
    Z = Z + 1
Next X
Exit Sub
InvalidDirEntryDescriptorNo:
EntryDescriptorNo = 0
Resume Next
End Sub
