Hello, i would like to ask how many handles i can open for files?

may i open 50 Filehandles?

In adition i would know how to delete data from a file.



Greets
Posted on 2004-01-12 13:42:03 by Bubu-Boy
I don't know the limit, but you should be able to open "a lot". 50 simultaneous open files does sound like a design error, though.

How you delete byte from a file? Copy all bytes from start of file to where you want to cut from to another file, skip cut-amount bytes, then copy bytes until the end of file. If this succeeded, delete original file and rename temp-file to the original name.
Posted on 2004-01-12 14:12:41 by f0dder
Normally it is 512 an attempt to open to many will return ERROR_TOO_MANY_OPEN_FILES.
Posted on 2004-01-12 15:00:57 by donkey
thanks!



Greets
Posted on 2004-01-12 15:02:54 by Bubu-Boy
From MSDN:
The total number of open handles in the system is limited only by the amount of memory available. However, a single process can have no more than 65,536 handles. Some object types support a limited number of handles per process, while other object types support a limited number of handles in the system.


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/handle_limitations.asp
Posted on 2004-01-12 20:26:34 by Mecurius
many thanks
Posted on 2004-01-13 00:44:28 by Bubu-Boy