RE: Incompatibility in Kernel32

2012-06-22 Thread robert.van.h...@serioustoys.com
> > Is there any reason that you call DeleteFile() on a still being opened file? > > That's the whole point of this test. The observed behavior is that you can > pass a > filename to MsiRecordSetStream, successfully delete the file, and keep on > using the > stream. I think DeleteFile on a opene

Incompatibility in Kernel32

2012-06-20 Thread robert.van.h...@serioustoys.com
Hi group, As I was trying write a fix for msi.dll, I stumbled upon an incompatibility in the kernel. If you open an existing file, FILE_SHARE_DELETE doesn't seem to work in Wine. In Windows, it does. Attached is a minimal test case. I feel hesitation towards starting to hack in kernel32 mysel

RE: msi:RECORD_StreamFromFile bug, help needed

2012-06-20 Thread robert.van.h...@serioustoys.com
> IStream is not exposed to the user, but an internal interface would probably > end up looking a lot like IStream because we need read/write/seek operations, > reference counting and the ability to create clones. So we might as well use > IStream. Hmmm... Then I want exactly the same as SHCrea

RE: msi:RECORD_StreamFromFile bug, help needed

2012-06-19 Thread robert.van.h...@serioustoys.com
> We don't have to call SHCreateStreamOnFileEx, we can add a suitable > implementation to msi. Ah, I see. I guess this stream cannot escape from MSI. The only way it can be accessed is through MsiRecordReadStream and MsiRecordSetStream, but it can never be accessed directly? In that case, we

RE: msi:RECORD_StreamFromFile bug, help needed

2012-06-19 Thread robert.van.h...@serioustoys.com
> Yes, the concern is that the file could be changed or removed. We should > test what native does here but it probably means that we need to create a > stream > on the file with a sharing mode that denies writing. So... I tried this out. I do not understand what I found though! On Windows, afte

RE: msi:RECORD_StreamFromFile bug, help needed

2012-06-19 Thread robert.van.h...@serioustoys.com
ds, Robert Van: Hans Leidekker [h...@codeweavers.com] Verzonden: dinsdag 19 juni 2012 13:04 Aan: robert.van.h...@serioustoys.com CC: wine-devel@winehq.org Onderwerp: RE: msi:RECORD_StreamFromFile bug, help needed On Tue, 2012-06-19 at 12:36 +0200, robert.van.h...@serioustoys.com wrote: > I alt

RE: msi:RECORD_StreamFromFile bug, help needed

2012-06-19 Thread robert.van.h...@serioustoys.com
van.h...@serioustoys.com CC: wine-devel@winehq.org Onderwerp: Re: msi:RECORD_StreamFromFile bug, help needed On Mon, 2012-06-18 at 14:14 +0200, robert.van.h...@serioustoys.com wrote: > But then I was thinking: this seems like such an obvious thing to do, that it > is > almost suspicious. Was there

msi:RECORD_StreamFromFile bug, help needed

2012-06-18 Thread robert.van.h...@serioustoys.com
Hi all, I think I found a msi.dll, record.c, RECORD_StreamFromFile. This function calls GlobalAlloc, with a file size as an argument. However, I believe that this can easily fail (which it does in my case) when the file size is too large. In my case, my msi builder (WiX) calls MsiRecordSetStrea