Appearantly I a going to need to supply details for a vote 'up'.. OK.
The internal flash buffer when first initiailized indicates if a movie is loaded or if the buffer hold properties in the buffer fisrt four bytes.
gUfU -- no movie loaded. properties to follow ....
fUfU -- .. [4bytes] size as integer.
then the UNCOMPRESSED movie or SWF as it were.
Write a IStream class.
fill with above.
save as szFile
TFlashStream *fStream = new TFlashStream(szFile);
// QI flash player
IPersistStreamInit * psStreamInit = 0;
shock->QueryInterface(::IID_IPersistStreamInit,
(LPVOID*)&psStreamInit);
if(psStreamInit)
{
psStreamInit->InitNew();
psStreamInit->Load(fStream);
psStreamInit->Release();
}
delete fStream;
Things to note :
When psStreamInit->Load(fStream);
will call IStream::Read looking for the header 'fUfU'.
if the return is correct psStreamInit then calls IStream::Read for the buffer size.
If everthing looks good so far, psStreamInit then reads in 1024 byte chunks until the read is exhausted.
However. for the header and file size.
STDMETHOD(Read)(void *pv, ULONG cb, ULONG *pcbRead)
pcbRead is invalid. you may want to use something like
IsBadReadPtr
--
Michael