EsbGetApplicationAccess

Gets a list of user application access structures, which contain information about user access to applications.

Syntax

EsbGetApplicationAccess (hCtx, User, AppName, pItems)
ByVal hCtx    As Long
ByVal User    As String
ByVal AppName As String
      pItems  As Integer
ParameterDescription

hCtx

VB API context handle.

User

User name. If an empty string, lists all users for the specified application.

AppName

Application name. If an empty string, lists all applications for the specified user.

pItems

Address of variable to receive Items of user application structures.

Notes

Return Value

If successful, returns a Items of users/applications in pItems, and generates a list of user application structures accessible via EsbGetNextItem()

Access

This function requires the caller to have application Design privilege (ESB_PRIV_APPDESIGN) for the specified application, unless they are getting their own application access information.

Example

Declare Function EsbGetApplicationAccess Lib "ESBAPIN" (ByVal hCtx As Long, ByVal User As String, ByVal AppName As String, Items As Integer) As Long

Sub ESB_GetApplicationAccess ()
   Dim Items As Integer
   Dim AppName As String
   Dim User As String
   Dim UserApp As ESB_USERAPP_T
   Dim sts As Long   AppName = "Demo"
   User = "Joseph"   '***********************
   ' Get Application Access
   '*********************** 
   sts = EsbGetApplicationAccess (hCtx,
   User, AppName, Items)   For n = 1 To Items       '*********************************
      ' Get next User Application Access
      ' structure from the list
      '*********************************
      sts = EsbGetNextItem (hCtx, 
      ESB_USERAPP_TYPE, UserApp)
   Next
End Sub

See Also