home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
PASCAL
/
PARADIS1
/
DVOPEN.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-02-07
|
3KB
|
77 lines
(4301) Wed 5 Feb 92 11:57
By: Robert Jenkins
To: All
Re: DESQview
St:
---------------------------------------------------------------------------
@EID:1185 005aa120
@MSGID: 1:389/5@FidoNet 120bc4af
Not long ago, some one posted a message wondering how to 'open a desqview
window' from dos (once DV is running). I have a procedure that will accept the
path to DV's file '??-PIF.DVP' and open that window. There is no error
checking. It is not to great, but here it is...
Unit DVWindow;
Interface
Procedure Open_DV_Window(DVP : String);
{Open a window in DESQview. DVP := Path to XX-PIF.DVP file}
{Example ' C:\DV\BD-PIF.DVP'}
{**************************************************************}
implementation
Procedure Open_DV_Window(DVP : String); {DVP := Full path to XX-PIF.DVP}
Var F : File; {This will be DV's XX-PIF.DVP file}
Var Buf : Array[1..416] of Byte; {buffer to store XX-PIF.DVP}
Var BufSeg : Word; {Seg of the buffer}
Var BufOfs : Word; {Ofs of the buffer}
Var Result : Word; {Variable for the results of the BlockRead}
Begin
Assign(F,DVP);
Reset(F,416); {The XX-PIF.DVP for DV 2.40 is 416 bytes}
BlockRead(F,Buf,1,Result); {Block Read the file into the buffer}
Close(F); {Close the XX-PIF.DVP file}
bufSeg := Seg(buf); {Get Segment of the buffer}
bufOfs := Ofs(buf); {Get the offset of the buffer}
asm
push ax ; {save the ax register }
push bx ; {save the bx register }
push es ; {save the es register }
push di ; {save the di register }
mov ax,$102C ; {load ax with the service request }
mov bx,$1a0 ; {load bx with the size of the buffer }
mov es,bufSeg ; {load es with the seg of the buffer }
mov di,bufOfs ; {load di with the ofs of the buffer }
int $15 ; {call the interrupt }
pop ax ; {restore the ax register }
pop bx ; {restore the bx register }
pop es ; {restore the es register }
pop di ; {restore the di register }
End; {end of the asm part}
End; {end of Open_DV_Window}
Begin
End. {End of DVWindow Unit}
Hope this helps some one!
Robert,
--- TosScan(q) 1.00
* Origin: ROBBS......................................? (1:389/5)
@PATH: 389/5 2 147/46 13/13 396/1 170/400 512/0 1007