[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 619
  • Last Modified:

Problem with LZSeek()

Hi experts
                I open a file using LZOpenFile(). let file size is greater than 5gb. File is  an image of a drive. using  LZSeek( INT hFile,LONG lOffset,INT iOrigin), we can't seek to an offset which exceed the long value. Is there any way to seek any offset? Let my file size is 8gb. and i want to read file's contents which are at 7gb and i want to use LZSeek as
     LZSeek(filehandle, offset,origin=beginning of file)
 where offset should be value around 7gb.
  • 2
1 Solution
You already ar eaware of the fact that 4GB is the limit to store in a LONG. So the only way I see is to use LZSeek twice (or mutilple times)

LZSeek (filehandle, 4GB, 0); //start at file beginning and go as far as possible
LZSeek (filehandle, 1GB, 1); //resume at current position and seek the remainder.
ManojKrChauhanAuthor Commented:
Thanks Experts
                   LZSeek() can be use twice or many times. But if a hard disk is of more than 200GB then a lot of problem. It's good suggestion but i want a way by which i can use LZSeek() only once.

 As _lseek() has another function
 __int64 _lseeki64( int fd, __int64 offset, int origin );

 Is there no function(i64) for LZSeek()?

SetFilePointer() is the best option. But it takes first parameter as HANDLE(of opened/created file). while LZOpenFile() returns an INT value. So i can't use SetFilePointer() here.
Thanks for reply. If is there any way then please reply.
Maybe wait for IA64 or AMD46 compatible windows? ;-)
If you know the file size and the desired offset it might be worth to search from the end of the file.

Can't find any clue on length of parameters for a call to LZSeek at

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now