[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH v2 1/5] mfplat: Add MFCreateFile stub
From:       Sven Baars <sven.wine () gmail ! com>
Date:       2018-10-31 20:39:52
Message-ID: 89131b41-52db-34b2-c7e2-619469ad0a5a () gmail ! com
[Download RAW message or body]

On 30-10-18 02:12, Zebediah Figura wrote:
> On 10/29/18 5:26 PM, Sven Baars wrote:
>> +HRESULT WINAPI MFCreateFile(MF_FILE_ACCESSMODE accessmode,
>> MF_FILE_OPENMODE openmode, MF_FILE_FLAGS flags,
>> +                            LPCWSTR url, IMFByteStream **bytestream)
>> +{
>> +    mfbytestream *object;
>> +
>> +    FIXME("(%d, %d, %d, %s, %p): stub\n", accessmode, openmode,
>> flags, debugstr_w(url), bytestream);
>> +
>> +    object = heap_alloc( sizeof(*object) );
>> +    if(!object)
>> +        return E_OUTOFMEMORY;
>> +
>> +    object->ref = 1;
>> +    object->IMFByteStream_iface.lpVtbl = &mfbytesteam_vtbl;
>> +    MFCreateAttributes(&object->attributes, 0);
>>         *bytestream = &object->IMFByteStream_iface;
>>         return S_OK;
>>   }
>
> I think it probably wouldn't be too difficult to implement this
> directly on top of MFCreateMFByteStreamOnStream, using
> SHCreateStreamOnFile(). Obviously the latter doesn't do anything yet,
> but the implementation seems pretty clear.

Hi Zebediah,

I am now working on implementing this, but unfortunately
SHCreateStreamOnFileEx is insufficient for the flags that can be passed
to MFCreateFile. I instead parse the flags so they can be passed to
CreateFileW as is also done in SHCreateStreamOnFileEx. However,
SHCreateStreamOnFileEx calls IStream_Create from the same file, but this
function is not exposed. Is there any way to get access to the IStream
interface defined in shlwapi/istream.c or does the same interface have
to be implemented in/copied to mfplat? Or should I just stop at the
point where the file is created for the moment since
MFCreateMFByteStreamOnStream doesn't do anything yet anyway?

Best,
Sven



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic