Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the end of a file

Status
Not open for further replies.

jsugrue

Programmer
Jun 14, 2002
3
IE
hoping someone can help me out here.

I'm trying to set the end of a file after using the _sopen() function to open the file handle (int).

I'm aware that there is a SetEndOfFile method for HANDLE's to files, but I need something to work with a int file handle.

If anyone could help me find a way of setting the end of a file I would appreciate it.

james
 
Hi,

I belive you are mixing functions as

CreateFile, OpenFile, CloseHandle, SetEndOfFile,...
(this are "modern" and powerful function, but a bit complex) whit low level routine as _sopen, _read, ...

maybe they can live together, but I would not mix them .

Then if you want use SetEnd.. (if you really need),
use OpenFile or as MS tells use CreateFile (also if
it exists, read doc )

bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top