[PATCH v2 1/5] mfplat: Add MFCreateFile stub
Sven Baars
sven.wine at gmail.com
Wed Oct 31 15:39:52 CDT 2018
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
More information about the wine-devel
mailing list