It turns out that the download file is so simple (ISAPI)

xiaoxiao2021-03-06  108

Previously, I couldn't solve the problem of downloading speed limitations. ISAPI can be so easy to get so easy to get this void cbinaryWrite :: default (chttpserverContext * pctxt) {charf [1024];

PCTXT-> GetServerVariable ("http_all", buf, 1024);

This-> addheader (PCTXT, "Content-Type = Image / JPEG / R / N"); this-> addheader (PCTXT, "Content-Type = Text / Plain / R / N");

STARTCONTENT (PCTXT); CFile F; F.Open ("D: //Photo-055.jpg", cfile :: moderad);

Ulong flen = f.getLength (); ulong break = 0; ulong brealread = 0;

While (BREAD 1024)? 1024: (Flen-Bread)); PCTXT-> WriteClient (BUF, & BREALREAD);

BREAD = BREALREAD; SLEEP (500);

}

f.close (); endContent (PCTXT);

转载请注明原文地址:https://www.9cbs.com/read-104191.html

New Post(0)