if ( a_SfcIsFileProtected( NULL, wszFileName)) printf( "Protected file\n\n") ; else printf( "Unprotected file\n\n") ; } else { // // SfcGetNextProtectedFile // // [This is preliminary documentation and subject to change.] // // The SfcGetNextProtectedFile function retrieves the complete list of protected // files. Applications should avoid replacing these files. // // BOOL WINAPI SfcGetNextProtectedFile( IN HANDLE RpcHandle, // must be NULL // IN PPROTECTED_FILE_DATA ProtFileData) ; // // Parameters: // // ProtFileData [in/out] Receives 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. // // Requirements: // // Windows NT/2000: Requires Windows 2000. // Windows 95/98: Unsupported. // Windows CE: Unsupported. // Header: Declared in sfc.h. // Import Library: Use sfc.lib. // // See Also: // // SfcIsFileProtected //
if ( ( a_SfcGetNextProtectedFile = GetProcAddress( hSFC, "SfcGetNextProtectedFile")) == NULL) { FreeLibrary( hSFC) ; printf( "Error: Api SfcGetNextProtectedFile not found\n\n", argv[ 0]) ; return -1 ; }