| www.delorie.com/archives/browse.cgi | search |
| Message-ID: | <3829D724.250921AE@maths.unine.ch> |
| Date: | Wed, 10 Nov 1999 21:35:49 +0100 |
| From: | Gautier <Gautier DOT deMontmollin AT maths DOT unine DOT ch> |
| X-Mailer: | Mozilla 4.51 (Macintosh; I; PPC) |
| X-Accept-Language: | en |
| MIME-Version: | 1.0 |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Paste Win Clipboard in DOS? |
| References: | <7uisdg$62d$1 AT solomon DOT cs DOT rose-hulman DOT edu> <380D100D DOT AD2EC6F6 AT Maths DOT UniNe DOT CH> <7uj7la$773$1 AT solomon DOT cs DOT rose-hulman DOT edu> <Pine DOT SUN DOT 3 DOT 91 DOT 991020135205 DOT 22660S-100000 AT is> <BmkP3.103$zO DOT 6204 AT dfiatx1-snr1 DOT gtei DOT net> <381279c8 DOT 9853836 AT newsserver DOT cc DOT monash DOT edu DOT au> <80cj2k$ce7$1 AT nnrp1 DOT deja DOT com> |
| NNTP-Posting-Host: | mac13-42.unine.ch |
| Lines: | 41 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
> But I've never been able to
> paste from the clipboard back into the same DOS program (open, get
> size, get data, close), whether it was copied from Notepad or that same
> DOS program. The size regs (dx:ax) always come back 0. Any idea why?
Maybe you are using a wrong subfunction number.
The following works (extract from a TP unit)
function Generic_winclip: boolean; assembler;
Asm
MOV AH, 17H
INT 2FH
OR AX, AX
JZ @end
MOV AL, 1
@end:
End;
function GetClipboardDataSize(Format: Word): LongInt;; assembler;
Asm
MOV DX, Format
MOV AX, 1704H
INT 2FH
End;
function GetClipboardData(Format: Word; var Data): Boolean; assembler;
Asm MOV DX, Format
LES BX, Data
MOV AL, 5
call near ptr Generic_winclip
End;
Note that the data size can be too long. A sort
of bug that will last till the end of Windows
You can see it in action (from/to Win clipboard) in EDIT
http://members.xoom.com/gdemont/edit.htm
HTH
--
Gautier
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |