What happens if I don't pass a pCreateExParams to CreateFile2?

Raymond Chen

Raymond

The final
pCreateExParams parameter to

the
CreateFile2 function

is optional.
What happens if I pass NULL?

If you pass NULL as the
pCreateExParams parameter,
then the function behaves as if you had passed
a pointer to this structure:

CREATEFILE2_EXTENDED_PARAMETERS defaultCreateExParams =
{
 sizeof(defaultCreateExParameters), // dwSize
 0, // dwFileAttributes
 0, // dwFileFlags
 0, // dwSecurityQosFlags
 NULL, // lpSecurityAttributes
 NULL, // hTemplateFile
};
Raymond Chen
Raymond Chen

Follow Raymond