Home away from home
Joined: 2006/12/4 23:15 Last Login
: 10/14 16:04
Group:
Registered Users
|
From the AWeb source using IIFParse.library
void Clipcopy(UBYTE *text,long length) { struct IFFHandle *iff; UBYTE *p; for(p=text;p<text+length;p++) { if(*p==0xa0) *p=' '; } if(iff=AllocIFF()) { if(iff->iff_Stream=(ULONG)OpenClipboard(PRIMARY_CLIP)) { InitIFFasClip(iff); if(!OpenIFF(iff,IFFF_WRITE)) { if(PushChunk(iff,ID_FTXT,ID_FORM,IFFSIZE_UNKNOWN)) goto err; if(PushChunk(iff,ID_FTXT,ID_CHRS,length)) goto err; if(WriteChunkBytes(iff,text,length)!=length) goto err; if(PopChunk(iff)) goto err; if(PopChunk(iff)) goto err;
err: CloseIFF(iff); } CloseClipboard((struct ClipboardHandle *)iff->iff_Stream); } FreeIFF(iff); } }
|