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

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

Received on Saturday, 22 March 2008 08:38:26 UTC