IsFolderExists

Used to check whether folder exists or not.

IsFolderExists( _

                ByVal ParentId                As Long,

                ByRef FolderIndex           As Long,

                ByVal CreationDate         As String,

                ByVal FolderName          As String,

                ByVal lOptions As Long) As Long

 

Parameters

In/out

Name

Data type

Description

In

ParentId

Long

Index of parent

In,Out

FolderIndex

Long

Index of folder

In

CreationDate

String

Date of creation of folder

In

FolderName

String

Name of folder

In

Loptions

Long

Options

 

Description  

This function is called from desktop and is used to verify if some particular folder exist or not. If folder is found it returns the index of folder in the FolderIndex parameter.

 

Return value  

Name

Description

NG_SUCCESS

In case of success

-3

Cabinet not connected

-4

Invalid Operation

-201

Insufficient rights for the current operation

 

Example 

Dim ParentId             As Long

Dim FolderIndex        As Long

Dim CreationDate      As String

Dim FolderName       As String

Dim lOptions             As Long

Dim lRetval               As Long

ParentId = 34

FolderIndex = 78

CreationDate = “01/11/02”

FolderName = “Myfolder”

lRetVal=gPDb(miCurCabId).IsFolderExist(ParentId,FolderIndex,CreationDate,FolderName,lOptions)

if lRetVal <> NG_SUCCESS Then

    MsgBox gPDb(miCurCabId).ErrDescription, vbInformation

     Screen.MousePointer = vbNormal

Endif