EsbGetApplicationAccess

Description

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

Parameters

hCtxEssbase VB API context handle.
UserUser name. If an empty string, lists all users for the specified application.
AppNameApplication name. If an empty string, lists all applications for the specified user.
pItemsAddress of variable to receive Items of user application structures.

Return Value

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

Notes

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 "ESBAPIW" (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

EsbGetDatabaseAccess()
EsbListUsers()
EsbSetApplicationAccess()
EsbSetUser()
EsbGetNextItem()