Category : Windows 3.X Files
Archive   : ACTTIMS.ZIP
Filename : VISTADB.CLS

 
Output of file : VISTADB.CLS contained in archive : ACTTIMS.ZIP
/* class comment */!!

inherit(Object, #VistaDB, #(name
dbn
vistaTask
thisTask
dbStatus), 2, nil)!!

setClassVars(VistaDB, #($DBEngine))!!

now(class(VistaDB))!!

Def clearLib(self)
{
$DBEngine := nil;
}
!!

Def hookDLL(self)
{
setName($DBEngine, "c:\actor\vpp\vista.dll");
add($DBEngine, #DT_CLOSE, 0, #(1));
add($DBEngine, #DT_CONNECT, 0, #(0, 1, 0));
add($DBEngine, #DT_CRGET, 0, #(1, 1, 0));
add($DBEngine, #DT_CRSET, 0, #(1, 1, 0));
add($DBEngine, #DT_CSMSET, 0, #(0, 1, 1, 0));
add($DBEngine, #DT_CSOGET, 0, #(0, 1, 1, 0));
add($DBEngine, #DT_CSOSET, 0, #(0, 1, 1, 0));
add($DBEngine, #DT_DELETE, 0, #(1, 0));
add($DBEngine, #DT_DISCON, 0, #(0, 1, 0));
add($DBEngine, #DT_FILLNEW, 0, #(0, 1, 1, 0));
add($DBEngine, #DT_FINDCO, 0, #(0, 1, 0));
add($DBEngine, #DT_FINDFM, 0, #(0, 1, 0));
add($DBEngine, #DT_FINDLM, 0, #(0, 1, 0));
add($DBEngine, #DT_FINDNM, 0, #(0, 1, 0));
add($DBEngine, #DT_FINDPM, 0, #(0, 1, 0));
add($DBEngine, #DT_IOPEN, 0, #(1, 1));
add($DBEngine, #DT_ICLOSE, 0, #(1, 0));
add($DBEngine, #DT_KEYFIND, 0, #(1, 1, 1, 0));
add($DBEngine, #DT_KEYFRST, 0, #(1, 1, 0));
add($DBEngine, #DT_KEYLAST, 0, #(1, 1, 0));
add($DBEngine, #DT_KEYNEXT, 0, #(1, 1, 0));
add($DBEngine, #DT_KEYPREV, 0, #(1, 1, 0));
add($DBEngine, #DT_KEYREAD, 0, #(1, 1));
add($DBEngine, #DT_MEMBERS, 0, #(0, 1, 1, 0));
add($DBEngine, #DT_OPEN, 0, #(1, 1, 1));
add($DBEngine, #DT_RECFRST, 0, #(0, 1, 0));
add($DBEngine, #DT_RECLAST, 0, #(0, 1, 0));
add($DBEngine, #DT_RECNEXT, 0, #(1, 0));
add($DBEngine, #DT_RECPREV, 0, #(1, 0));
add($DBEngine, #DT_RECREAD, 0, #(1, 1, 0));
add($DBEngine, #DT_RECWRITE, 0, #(1, 1, 0));
add($DBEngine, #DT_SETRO, 0, #(0, 1, 0));
load($DBEngine);
}
!!

Def new(self, name, task | tmp)
{
tmp := new(self:Behavior);
if $DBEngine = nil then
$DBEngine := new(Library);
hookDLL(self);
endif;
^init(tmp, name, task);
}
!!

now(VistaDB)!!

Def csoget(self, set, dbaddr)
{
^dbStatus := pcall(procs($DBEngine)[#DT_CSOGET], set, dbaddr, thisTask, dbn);
}
!!

Def findco(self, set)
{
^dbStatus := pcall(procs($DBEngine)[#DT_FINDCO], set, thisTask, dbn);
}
!!

Def keyread(self, keyval)
{
^dbStatus := pcall(procs($DBEngine)[#DT_KEYREAD], keyval, thisTask);
}
!!

Def findlm(self, set)
{
^dbStatus := pcall(procs($DBEngine)[#DT_FINDLM], set, thisTask, dbn);
}
!!

Def findpm(self, set)
{
^dbStatus := pcall(procs($DBEngine)[#DT_FINDPM], set, thisTask, dbn);
}
!!

Def findnm(self, set)
{
^dbStatus := pcall(procs($DBEngine)[#DT_FINDNM], set, thisTask, dbn);
}
!!

Def recprev(self)
{
dbStatus := pcall(procs($DBEngine)[#DT_RECPREV], thisTask, dbn);
}
!!

Def recnext(self)
{
dbStatus := pcall(procs($DBEngine)[#DT_RECNEXT], thisTask, dbn);
}
!!

Def reclast(self, rec)
{
dbStatus := pcall(procs($DBEngine)[#DT_RECLAST], rec, thisTask, dbn);
}
!!

Def keyprev(self, key)
{
^dbStatus := pcall(procs($DBEngine)[#DT_KEYPREV], key, thisTask, dbn);
}
!!

Def keynext(self, key)
{
^dbStatus := pcall(procs($DBEngine)[#DT_KEYNEXT], key, thisTask, dbn);
}
!!

Def keylast(self, key)
{
^dbStatus := pcall(procs($DBEngine)[#DT_KEYLAST], key, thisTask, dbn);
}
!!

Def keyfrst(self, key)
{
^dbStatus := pcall(procs($DBEngine)[#DT_KEYFRST], key, thisTask, dbn);
}
!!

Def keyfind(self, key, data)
{
^dbStatus := pcall(procs($DBEngine)[#DT_KEYFIND], key, data, thisTask, dbn);
}
!!

Def setro(self, set)
{
^dbStatus := pcall(procs($DBEngine)[#DT_SETRO], set, thisTask, dbn);
}
!!

Def findfm(self, set)
{
^dbStatus := pcall(procs($DBEngine)[#DT_FINDFM], set, thisTask, dbn);
}
!!

Def members(self, set, count)
{
^dbStatus := pcall(procs($DBEngine)[#DT_MEMBERS], set, count, thisTask, dbn);
}
!!

Def discon(self, set)
{
^dbStatus := pcall(procs($DBEngine)[#DT_DISCON], set, thisTask, dbn);
}
!!

Def csmset(self, set, dbaddr)
{
^dbStatus := pcall(procs($DBEngine)[#DT_CSMSET], set, dbaddr, thisTask, dbn);
}
!!

Def connect(self, set)
{
^dbStatus := pcall(procs($DBEngine)[#DT_CONNECT], set, thisTask, dbn);
}
!!

Def csoset(self, set, dbaddr)
{
^dbStatus := pcall(procs($DBEngine)[#DT_CSOSET], set, dbaddr, thisTask, dbn);
}
!!

Def delete(self)
{
pcall(procs($DBEngine)[#DT_DELETE], thisTask, dbn);
}
!!

Def recwrite(self, data)
{
^dbStatus := pcall(procs($DBEngine)[#DT_RECWRITE], data, thisTask, dbn);
}
!!

Def fillnew(self, rec, data)
{
^dbStatus := pcall(procs($DBEngine)[#DT_FILLNEW], rec, data, thisTask, dbn);
}
!!

Def recfrst(self, rec)
{
dbStatus := pcall(procs($DBEngine)[#DT_RECFRST], rec, thisTask, dbn);
}
!!

Def crget(self, dba)
{
^dbStatus := pcall(procs($DBEngine)[#DT_CRGET], dba, thisTask, dbn);
}
!!

Def crset(self, dba)
{
^dbStatus := pcall(procs($DBEngine)[#DT_CRSET], dba, thisTask, dbn);
}
!!

Def recread(self, data)
{
^dbStatus := pcall(procs($DBEngine)[#DT_RECREAD], data, thisTask, dbn);
}
!!

Def setDbn(self, num)
{
dbn := num;
}
!!

Def getDbn(self)
{
^dbn;
}
!!

Def close(self | tmp)
{
tmp := getDbn(self);
if (deactivate(vistaTask, self) <> nil) then
dbn := -1;
^dbStatus := pcall(procs($DBEngine)[#DT_ICLOSE], thisTask, tmp);
else
^nil;
endif;
}
!!

Def open(self)
{
if (activate(vistaTask, self) <> nil) then
dbn := numItems(vistaTask.activeDBs) - 1;
if (numItems(vistaTask.activeDBs) = 1) then
dbStatus := pcall(procs($DBEngine)[#DT_OPEN], name, getOpenType(vistaTask), thisTask);
else
dbStatus := pcall(procs($DBEngine)[#DT_IOPEN], name, thisTask);
endif;
if (dbStatus <> 0) then
deactivate(vistaTask, self);
dbn := -1;
errorBox("Unable to open database", name);
endif;
^dbStatus;
else
^nil;
endif;
}
!!


Def init(self, dbname, task)
{
addName(task, self);
name := asciiz(dbname);
dbn := -1;
vistaTask := task;
thisTask := getTask(task);
}
!!

  3 Responses to “Category : Windows 3.X Files
Archive   : ACTTIMS.ZIP
Filename : VISTADB.CLS

  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/