TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mike Bilow
from: Paul Edwards
date: 1995-08-29 23:22:02
subject: dossubset

#include 

#include 

static char buf[30000];

int main(void)
{
    int x;
    HFILE fq;
    APIRET rc;
    ULONG  action;
    ULONG  newsize = 0;
    ULONG  fileAttr = 0;
    ULONG  openAction = 0;
    ULONG  openMode = 0;
    size_t towrite;
    ULONG actualWritten;
    
    openAction |= OPEN_ACTION_CREATE_IF_NEW;
    openAction |= OPEN_ACTION_REPLACE_IF_EXISTS;
    openMode |= OPEN_ACCESS_WRITEONLY;
    openMode |= OPEN_SHARE_DENYWRITE;
    rc = DosOpen("temp.txt",
                 &fq,
                 &action, 
                 newsize, 
                 fileAttr,
                 openAction, 
                 openMode, 
                 NULL);
    towrite = sizeof buf;
    for (x = 0; x < 2000; x++)
    {
        rc = DosWrite(fq, buf, towrite, &actualWritten);
    }
    DosClose(fq);
    return (0);
}
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.