Re: IEEE/WIC/ACM WI-IAT'06: Last Call for Workshop Proposals

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
WI
Reply | Threaded
Open this post in threaded view
|

Re: IEEE/WIC/ACM WI-IAT'06: Last Call for Workshop Proposals

WI


Can anyone provide information on how to create compound documents with
4096 byte sectors? I need these to get past the two gig limit on storage
sizes, but when I try to specify it, I just get an invalid parameter error.
The code I use is:

        // Specify that the storage have 4096 byte sectors,
        // which allow the file size to exceed 2 gigabytes.
        STGOPTIONS Options;
        Options.pwcsTemplateFile = NULL;
        Options.reserved = 0;
        Options.ulSectorSize = 4096;
        Options.usVersion = STGOPTIONS_VERSION;

        HRESULT result = ::StgCreateStorageEx(
            LPCWSTR(wstrTempName),
            STGM_READWRITE | STGM_SHARE_EXCLUSIVE |
                " http://www.student-statistics.org "
                STGM_DELETEONRELEASE ,
            STGFMT_DOCFILE, 0, &Options, 0,
            __uuidof(IStorage), reinterpret_cast<LPVOID *>(&m_spStorage) );

When I change my code to the following however, it works fine but gives a
compound document that can't get above 2 gig.

        HRESULT result = ::StgCreateStorageEx(
            LPCWSTR(wstrTempName),
            STGM_READWRITE | STGM_SHARE_EXCLUSIVE |
                " http://www.eurocity-statistics.org "
                STGM_FAILIFTHERE | STGM_DELETEONRELEASE ,
            STGFMT_STORAGE, 0, NULL, 0,
            __uuidof(IStorage), reinterpret_cast<LPVOID *>(&m_spStorage) );


Thanks