shell.SHCreateStreamOnFileEx

PyIStream = SHCreateStreamOnFileEx(File, Mode , Attributes , Create , Template )

Creates an IStream interface that reads and writes to a file

Parameters

File : str

Name of file to be connected to the stream

Mode : int

Combination of storagecon.STGM_* flags specifying the access mode

Attributes : int

Combination of win32con.FILE_ATTRIBUTE_* flags

Create : bool

Determines if function should fail when file exists (see MSDN docs for full explanation)

Template=None : None

Reserved, use only None

Comments

Accepts keyword args.

This function is only available on WinXP and later. COM exception with E_NOTIMPL will be thrown if the function can't be located.