MapViewOfFile() for file larger than 4GByte?

Discussion in 'Windows 64bit' started by Guest, Sep 27, 2005.

  1. Guest

    Guest Guest

    In case of I've got a file larger than 4GByte can I map the entire file into
    my address space in 64bit Windows?
    MapViewOfFile() supports only a DWORD argument for the mapping size but this
    can be left zero to indicate that one wants to map the entire file.
    Does this work for files larger than 4GByte?
    Guest, Sep 27, 2005
    1. Advertisements

  2. Andre Da Costa [Extended64], Sep 27, 2005
    1. Advertisements

  3. If he were using FAT32 then his question couldn't arise in the first place.
    His file is already greater than 4GB and his question concerns
    Norman Diamond, Sep 28, 2005
  4. Andre Da Costa [Extended64], Sep 28, 2005
  5. If you're calling from a 64 bit program, then yes, it should grab a file
    larger than 4GB, since the address space available is 8TB. But I am NOT a
    programmer, and I don't even play one on the Internet any more.
    Charlie Russel - MVP, Sep 28, 2005
  6. Charlie Russel - MVP, Sep 28, 2005
  7. Guest

    Mercury Guest

    LPVOID MapViewOfFileEx(
    HANDLE hFileMappingObject,
    DWORD dwDesiredAccess,
    DWORD dwFileOffsetHigh,
    DWORD dwFileOffsetLow,
    SIZE_T dwNumberOfBytesToMap,
    LPVOID lpBaseAddress

    SIZE_T The maximum number of bytes to which a pointer can point. Use
    for a count that must span the full range of a pointer.
    This type is declared in Basetsd.h as follows:

    typedef ULONG_PTR SIZE_T;

    IE SIZE_T is = LONG_PTR which *is* 64bit.
    Mercury, Sep 28, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.