| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: dossubset -- not. |
The following code was compiled with VisualAge C++ and run through the
profiler. No calls to DosSubSet were traced. DosWrite consumed 99%
of runtime, DosClose 1%, DosOpen was the only other function traced.
#define INCL_DOS
#include
#include
static char buf[30000];
int main(void) {
int x;
HFILE fq;
ULONG action;
ULONG newsize = 0;
ULONG fileAttr = 0;
ULONG openAction = 0;
ULONG openMode = 0;
ULONG actualWritten;
openAction |= OPEN_ACTION_CREATE_IF_NEW;
openAction |= OPEN_ACTION_REPLACE_IF_EXISTS;
openMode |= OPEN_ACCESS_WRITEONLY;
openMode |= OPEN_SHARE_DENYWRITE;
if(!DosOpen("temp.txt",
&fq,
&action,
newsize,
fileAttr,
openAction,
openMode,
NULL)) {
for (x = 0; x < 2000; x++) {
if(DosWrite(fq,buf,sizeof(buf),&actualWritten))
break;
}
DosClose(fq);
}
return 0;
}
--- XHEd-OS/2 1.22
* Origin: The Pit (1:380/16)SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 380/25 270/101 105/103 42 712/515 711/808 809 934 |
|
| 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™.