Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7533399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:42:53+00:00 2026-05-30T05:42:53+00:00

I am on Windows 7, 64bit and NTFS. I am building a DLL that

  • 0

I am on Windows 7, 64bit and NTFS.
I am building a DLL that must be 32 bit. I have a very simple routine that I’d like to implement in C++. I’m reading a large file using:

unsigned long p;
ifstream source(file);
streampos pp(p);
source.seekg(pp);

For files over 4GB I tried using unsigned long long but it’s not working.
What am I doing wrong? I’m using GNU GCC, would it be of any use trying MSVC Express 2008/2010?

Update:

There seems that something is wrong with my GCC. Right now I’m testing your proposals using MSVC and it seems that is working. MSVC uses an _int64 to represent streampos/streamoff objects, I will check later with GCC.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:42:54+00:00Added an answer on May 30, 2026 at 5:42 am

    You may have to use a number of relative seeks instead, i.e. use the two-argument overload of seekg.

    // Start with seeking from the beginning
    source.seekg(some_pos, std::ios::beg);
    
    // Then seek some more from that position
    source.seekg(some_offset, std::ios::cur);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some older code that doesn't appear to work on 64bit Windows 7.
We have a 64bit C#/.Net3.0 application that runs on a 64bit Windows server. From
Below are my project boundaries Windows 7 64bit jre 1.6 64 bit jacob dll
OS: Windows XP, Windows 7 64bit. We have some fairly hefty cmd scripts that
I have Windows XP 64bit extracted from ISO file. I know 32 bit Windows
I have the following scenario: - 64bit Windows Server 2008. - 32bit .NET application
I have two websites running on the same Windows 2008r2 64bit server, SQL Server
the set the i have so far is: windows 7 64bit Apache 2.2.14/mysql/php 5.3.1
I've got a Play (1.2.4) application that's working fine on my Windows 7 64bit
I have Python 3.2 and python 1.5.2 installed on my system (windows 7 64bit)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.