Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ns-mx!ccad.uiowa.edu!cadsi From: cadsi@ccad.uiowa.edu (CADSI) Newsgroups: comp.os.os2.programmer Subject: Re: Reading more than 64K Message-ID: <1991Apr30.200832.9352@ccad.uiowa.edu> Date: 30 Apr 91 20:08:32 GMT References: Distribution: comp.os.os2.programmer Organization: CAD-Research, U. of Iowa, Iowa City, Iowa Lines: 21 From article , by so-ecs@stekt1.oulu.fi (Juha Ruotsalainen ti): > How can my program read a file bigger than 64k into memory. At the > moment I try to read 64k`s at a time and the rest of it (less than > 64k) afterwards. But after I`ve read 0xffff bytes, the next DosRead > reads only 1 byte. Is there a problem with DosAllocHuge, I mean, > shouldn`t it allocate a memory block larger than 64k. I have traced > the DosRead call with CodeView, and was surprised to see that when the > program tried to point past 64k area (jimi[0x10000]) there was an I/O > error. I hope you understand my I`m trying to say here. Please help... > -ECS Is this a problem with the fact that read and write can only r/w 64K - 1 bytes at a time, noting the fact that the error status return (-1) from read and write represents 64K exactly??? |----------------------------------------------------------------------------| |Tom Hite | The views expressed by me | |Manager, Product development | are mine, not necessarily | |CADSI (Computer Aided Design Software Inc. | the views of CADSI. | |----------------------------------------------------------------------------|