EsbGetLocalPath

Gets the full local file path for a specific object file on the client.

Syntax

EsbGetLocalPath (hCtx, ObjType, AppName, DbName, ObjName, isCreate, Path, szPath)
ByVal hCtx     As Long
ByVal ObjType  As Long
ByVal AppName  As String
ByVal DbName   As String,
ByVal ObjName  As String
ByVal isCreate As Integer
ByVal Path     As String
ByVal szPath   As Integer
ParameterDescription

hCtx

API context handle returned by EsbCreateLocalContext().

ObjType

Object type (must be single type). See Table 15, Bitmask Data Types for a list of object types.

AppName

Application name.

DbName

Database name. If an empty string, uses the Application sub-directory.

ObjName

Object name.

isCreate

Create directories flag. If TRUE, the appropriate application and database sub-directories will be created if necessary. If FALSE, and the directories do not exist, an error will be generated.

Path

Buffer to receive allocated local path name string.

szPath

Size of the buffer to receive allocated local path name string.

Notes

If the Path string length is greater that the size of the buffer, the Path string is truncated.

Return Value

If successful, returns the full path name of the appropriate object file in Path.

Access

This function requires no special privileges.

Example

Declare Function EsbGetLocalPath Lib "ESBAPIN" (ByVal hCtx As Long, ByVal ObjType As Integer, ByVal AppName As String, ByVal DbName As String, ByVal ObjName As String, ByVal Create As Integer, ByVal Path As String, ByVal szPath As Integer) As Long

Sub ESB_GetLocalPath ()
   Dim sts As Long
   Dim AppName As String
   Dim DbName As String
   Dim ObjName As String
   Dim ObjType As Integer
   Dim Create As Integer
   Const szPath = 128
   Dim Path As String * szPath   AppName = "Sample"
   DbName = "Basic"
   ObjName = "Basic"
   ObjType = ESB_OBJTYPE_TEXT
   Create = ESB_YES   '***************
   ' Get local path
   '***************
   sts = EsbGetLocalPath (hCtx, ObjType, AppName, DbName, ObjName, Create,
   Path, szPath) 
End Sub

See Also