Category : BASIC Source Code
Archive   : QBNW-20.ZIP
Filename : BIND_ACC.SUB

 
Output of file : BIND_ACC.SUB contained in archive : QBNW-20.ZIP
'--------------------------------------------------------------------------'
' '
' This routine tells you your Bindery access rights. It also will '
' tell you what your user ID is. '
' '
'--------------------------------------------------------------------------'
'
Sub Bind.Level(Mask%, My.User.ID$, My.User.ID.HEX$) static
defint a-z
'
' Set aside bytes for interrupt registers
'
redim inary%(7),outary%(7)
'
' Build NetWare fuction request buffer
' In this case, function &H46
'
Request$ = mki$(1) + chr$(&h46)
'
' Make space for the reply returned by NetWare. In This
' case it is 7 nulls.
'
Reply$ = mki$(7) + string$(7,0)
'
' The AX register
'
inary%(0) = &HE300
'
' The ES:DI register
'
inary%(5) = SADD(Request$)
'
' The DS:SI register
'
inary%(6) = SADD(Reply$)
'
' Perform DOS Interrupt &h21
'
call int86(&H21,varptr(inary%(0)),varptr(outary%(0)))
'
' Receive error status from register AX.
'
Status% = Outary%(0)
'
mask% = asc(mid$(reply$, 3, 1))
'
' MASK% is defined as follows:
'
' First byte (High) Designated WRITE access to the
' bindery, last byte (Low) Designated READ access.
'
' 0 = ANYONE, logged in or not
' 1 = ANYONE who is logged in
' 2 = Any OBJECT, or SUPERVISOR
' 3 = SUPERVISOR only
' 4 = Bindery only
'
' Examples:
'
' &h00 = ANYONE Logged in or not, Read and Write
' &h21 = Object or Supervisor may WRITE, any logged in may read.
' &h33 = SUPERVISOR Write / Read
'
'
My.User.ID$ = mid$(reply$, 4, 4)
'
id.a = asc(mid$(reply$, 4, 1))
id.b = asc(mid$(reply$, 5, 1))
id.c = asc(mid$(reply$, 6, 1))
id.d = asc(mid$(reply$, 7, 1))
'
a$ = hex$(id.a):if id.a < &h0F then a$ = "0" + a$
b$ = hex$(id.b):if id.b < &h0F then b$ = "0" + b$
c$ = hex$(id.c):if id.c < &h0F then c$ = "0" + c$
d$ = hex$(id.d):if id.d < &h0F then d$ = "0" + d$
My.User.ID.HEX$ = a$ + b$ + c$ + d$
end sub


  3 Responses to “Category : BASIC Source Code
Archive   : QBNW-20.ZIP
Filename : BIND_ACC.SUB

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/