【 tulaoshi.com - 编程语言 】
                             
                            //---------------------------------------------------------------------------
  #include "sfc.h"
  // 本工程中需要导入sfc.lib
  //---------------------------------------------------------------------------
  // 列出所有被保护的文件
  void __fastcall ListAllProtectedFile(TStrings *pList)
  {
      PROTECTED_FILE_DATA data;
      data.FileNumber = 0;
      while(SfcGetNextProtectedFile(NULL, &data))
      {
          if(data.FileNumber != 0)
          {
              pList-Add(data.FileName);
          }
      }
  }
  //---------------------------------------------------------------------------
  // 判定一个文件是否被保护
  bool __fastcall IsFileProtected(String strFile)
  {
      WCHAR wszFileName[MAX_PATH];
      MultiByteToWideChar(CP_ACP, 0, strFile.c_str(), -1, wszFileName, MAX_PATH);
      return SfcIsFileProtected(NULL, wszFileName);
  }
  //---------------------------------------------------------------------------
  // 本文来自C++ Builder 研究. http://www.ccrun.com
  //---------------------------------------------------------------------------
  // 调用举例
  void __fastcall TForm1::Button1Click(TObject *Sender)
  {
      // ListAllProtectedFile(Memo1-Lines);
      if(IsFileProtected("E:Winntsystem32subst1.exe"))
          ShowMessage("被保护了");
      else
          ShowMessage("没有被保护");
  }
  //---------------------------------------------------------------------------