请教各位大虾:在2000/xp的ntfs分区里
1..用什么方法可以删除某个文件夹下安全设置里的指定的用户或用户组???当然是要求用API或控件之类来解决,不是调用dos命令(CACLS.exe)来解决.2.如果该文件夹下还有子目录,希望删除了该文件夹里的某个用户(组)后,能把这个安全设置的改变也传播(或继承)给了它下面的子目录.各位大虾帮帮忙了,这个问题让我很困惑.
有vb例子或相关资料网站连接也好.

解决方案 »

  1.   

    唉,看来是个难题.应该不是楼上GG说的注册表那么简单.小妹的作业就有相关操作用户的要求,嗯,也卡在这个地方了,555.
    哪位GG能出手相救一下呢^^^
      

  2.   

    DeleteAce
    The DeleteAce function deletes an ACE from an ACL. An ACE is an access-control entry. An ACL is an access-control list. BOOL DeleteAce(
      PACL pAcl,         // pointer to access-control list
      DWORD dwAceIndex   // index of ACE position in ACL
    );
     
    Parameters
    pAcl 
    Points to an ACL structure. The ACE specified by the dwAceIndex parameter is removed from this ACL. 
    dwAceIndex 
    Specifies the ACE to delete. A value of 0 corresponds to the first ACE in the ACL, 1 to the second ACE, and so on. 
    Return Values
    If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError. Res
    An application can use the ACL_SIZE_INFORMATION structure retrieved by the GetAclInformation function to discover the size of the ACL and the number of ACEs it contains. The GetAce function retrieves information about an individual ACE. QuickInfo
      Windows NT: Requires version 3.1 or later.
      Windows: Unsupported.
      Windows CE: Unsupported.
      Header: Declared in winbase.h.
      Import Library: Use advapi32.lib.See Also
    Low-Level Access-Control Overview, Low-Level Access Control Functions, ACL, ACL_SIZE_INFORMATION, AddAccessAllowedAce, AddAccessDeniedAce, AddAce, AddAuditAccessAce, GetAce, GetAclInformation 
      

  3.   

    对,就用DeleteAce,vb声明:
    Declare Function DeleteAce Lib "advapi32.dll" (ByRef pAcl As ACL, ByVal dwAceIndex As long) As long
      

  4.   

    yonghengdizhen(等季节一过,繁花就凋落')
    能给个小例子吗?DeleteAce里的参数不会用啊.谢谢