🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2159

*** USING _llseek WITH LARGE FILES *** |(8> HELP <8)|

#2159
From: Robert D. Thompson
Date: Wed, 17 Apr 1991 18:56
34 lines
1279 bytes
Someone,

	According to the SDK, I should be able to open a file,

		hFile = _lopen("myfile.txt", OF_READ);

	Notice that this is a text file, not a binary one.

	Then, I should be able to "randomly" access the end of the
	file,

		_llseek(hFile, (long int)newPosition, 2);

	The "2", of course, is the iOrigin specifying that the 
	newPosition is an offset from the END OF THE FILE.

	But this never works.

	The return value of _llseek (the new file position) is always
	a large negative number.

	How can I get around this?

	This file is a very large file.

	I thought I remember reading something about files larger than
	64k and how one must get around this.

	I would appreciate anyones help.

	Thanks.
---
Robert
rdthomps@vela.acs.oakland.edu
Technical Details
Message-ID: <5935@vela.acs.oakland.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!m.cs.uiuc.edu!vela!rdthomps

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!m.cs.uiuc.edu!vela!rdthomps
From: rdthomps@vela.acs.oakland.edu (Robert D. Thompson)
Newsgroups: comp.windows.ms.programmer
Subject: *** USING _llseek WITH LARGE FILES ***  |(8> HELP <8)|
Message-ID: <5935@vela.acs.oakland.edu>
Date: 17 Apr 91 18:56:18 GMT
Reply-To: rdthomps@vela.acs.oakland.edu (Robert D. Thompson)
Distribution: world
Organization: Oakland University, Rochester MI
Lines: 35