SfcGetNextProtectedFile function (sfc.h)

[This function is available for use in the operating systems specified in the Requirements section. Support for this function was removed in Windows Vista and Windows Server 2008. Use the supported functions listed in WRP Functions instead.]

Retrieves the complete list of protected files. Applications should not replace these files.

Syntax

BOOL SfcGetNextProtectedFile(
  [in]      HANDLE               RpcHandle,
  [in, out] PPROTECTED_FILE_DATA ProtFileData
);

Parameters

[in] RpcHandle

This parameter must be NULL.

[in, out] ProtFileData

The list of protected files. The format of this structure is as follows.

typedef struct _PROTECTED_FILE_DATA {
    WCHAR   FileName[MAX_PATH];
    DWORD   FileNumber;
} PROTECTED_FILE_DATA, *PPROTECTED_FILE_DATA;

Before calling this function the first time, set the FileNumber member to zero.

Return value

If the function succeeds, the return value is nonzero.

If there are no more protected files to enumerate, the return value is zero and GetLastError returns ERROR_NO_MORE_FILES. If the function fails, GetLastError will return a different error code.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header sfc.h
Library Sfc.lib
DLL Sfc.dll

See also

SfcIsFileProtected