LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Home
Show details for ContentContent
Purchase
Ready-to-use samples
Show details for Online resourcesOnline resources
Forum
Links
Happy readers

Anonymous

login


 

Hosted by Prominic.NET, Inc.
Main topic: using ACLLookupAccess . . .

using ACLLookupAccess . . . (by Normunds Kalnberzins, 05/25/2005 02:44:12 PM)

well, it works for me at least for a name in ACL. Apart from your considerations about groups -- if it does not suite you, you probably need to build the NAMES_LIST yourself. Create a memory buffer and nicely store everything it needs.

Here is my code -- based on your's (and minus declarations):

   Dim lngHAcl As Long, irc As Integer

   

   irc%=   W32NSFDbReadACL(lngHdb&, lngHAcl)

   If irc%<>0 Then

      Print getError(irc)

   Else

      

      Dim names As NamesListType

      

      Dim AccessLevel As Integer

      Dim Privileges As Long, AccessFlags As Integer, HPrivNames As Long

      

      Dim s As New NotesSession

      Dim hNames As Long

      irc = W32_NSFBuildNamesList (s.UserName, 0&, hNames)

      If irc<>0 Then

         Print getError(irc)

      Else

         'names.nameCount = 1

         'names.users = s.UserName

         Dim pNames As Long

         If hNames<>0 Then

            pNames = W32_OSLockObject(hNames)

            Print pNames

            irc = W32ACLLookupAccess (lngHACL, pnames, AccessLevel, Privileges, AccessFlags, HPrivNames)

            If irc%<>0 Then

               Print irc, "error:", getError(irc)

            Else

               Print "done, level:", AccessLevel, "my access level:" &intAxsLevel

            End If

            W32_OSUnLockObject hNames

         End If         

      End If

      

      W32_OSMemFree lnghACL

   End If