http://bugs.winehq.org/show_bug.cgi?id=4436
------- Additional Comments From mike@codeweavers.com 2006-08-02 21:58 -------
Some comments here:
if(stm) { r=IStorage_Commit(stg,STGC_DEFAULT); ok(r==S_OK, "StorageCommit failed\n"); }
Looks like we should write out the storage file when Commit is called above, and that's the main source of trouble.
// Windows reference counting seems different....
r = IStorage_Release(stg); ok(r == 0, "wrong ref count"); printf("- ref count = %lx\n",r);
if(r) { r = IStorage_Release(stg); ok(r == 0, "wrong ref count"); printf(" - ref count = %lx\n",r); }
The above is technically wrong. You only grabbed the storage once, so you should only release it once. One of those should be an IStream_Release().