W3C home > Mailing lists > Public > public-compound-documents@w3.org > March 2008

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

From: WI <wi@maebashi-it.org>
Date: Sat, 22 Mar 2008 15:37:40 +0700
Message-ID: <47E4C554.4020801@maebashi-it.org>
To: public-compound-documents@w3.org


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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 March 2008 08:38:27 GMT