EsbGetActive

Description

EsbGetActive() gets the names of the caller's current active application and database.

Syntax
EsbGetActive (hCtx, AppName, szApp, DbName, szDb, pAccess)
ByVal hCtx    As Long
ByVal AppName As String
ByVal szApp   As Integer
ByVal DbName  As String
ByVal szDb    As Integer
ByVal pAccess As Integer

Parameters

hCtxEssbase VB API context handle.
AppNameBuffer to receive an application name string.
szAppSize of an application name string buffer.
DbNameBuffer to receive a database name string.
szDbSize of the database name string buffer.
pAccessAddress of variable to receive the user's access level to the selected database.

Return Value

If successful, returns the user's selected active application and database in AppName and DbName.

Notes

Access

This function requires no special privileges.

Example

Declare Function EsbGetActive Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal szApp As Integer, ByVal DbName As String, ByVal szDb As Integer, Access As Integer) As Long

Sub ESB_GetActive ()
   Dim AppName As String * ESB_APPNAMELEN
   Dim DbName As String * ESB_DBNAMELEN
   Dim sts As Long
   Dim szApp As Integer
   Dim szDb As Integer
   Dim pAccess As Integer 

   szApp = ESB_APPNAMELEN
   szDb = ESB_DBNAMELEN

   '**********************************
   ' Get active Application & Database 
   '********************************** 
   sts = EsbGetActive (hCtx, AppName, szApp, DbName, szDb, Access)
End Sub 

See Also

EsbClearActive()
EsbSetActive()