What does the fCreate parameter to SHCreateStreamOnFileEx mean?

Raymond Chen

Raymond

The documentation for the fCreate parameter for the SHCreateStreamOnFileEx function covers the issue, but since people seem to really like charts and tables, I’ll present the same information in tabular form.

grfModefCreateFile exists?Behavior
STGM_CREATE(ignored)YesFile is opened (old contents lost)
STGM_CREATE(ignored)NoFile is created
STGM_FAILIFTHEREFALSEYesFile is opened (old contents preserved)
STGM_FAILIFTHEREFALSENoFails
STGM_FAILIFTHERETRUEYesFails
STGM_FAILIFTHERETRUENoFile is created

0 comments

Comments are closed. Login to edit/delete your existing comments