ePass1000 C/C++ API Reference Manual Version 2.0

# epas_GetCurrentDir

The epas_GetCurrentDir function returns the identifier of the currently selected directory.

    EPAS_STATUS EPAS_API
    epas_GetCurrentDir(
        EPAS_HANDLE hContextHandle,    // [in]
        unsigned long ulFlags,         // [in]
        unsigned long* pulPath,        // [out]
        unsigned long ulMaxLevels,     // [in]
        unsigned long* pulRetLevels    // [out]
    );

#### Requirement

epas_CreateContext, epas_OpenDevice

#### Parameters

hContextHandle
  [in] Handle to device context.
ulFlags
  [in] Reserved for future extension. Must be set to zero.
pulPath
  [out] Pointer to a buffer. Upon return, this buffer contains the path of the current directory.

  The buffer is formatted as follows:

  Dir[0] Defines the root directory ID.

  Dir[n] Defines the child directory at level n relative to the root directory. n is in the range of 1 to pulRetLevels parameter.

ulMaxLevels
  [in] Maximum number of levels to return. This value should be the number of long integers defined in the pulPath parameter.
pulRetLevels
  [out] Actual number of levels returned.

#### Remarks

To get the maximum number of directory levels use the epas_GetProperty function to retrieve the EPAS_SYSINFO structure.

#### Return Values

If the function succeeds, FT_SUCCESS returned.

For a list of all return codes, see Status Return Values.

#### See Also

epas_CreateFile, epas_DeleteFile, epas_OpenFile, epas_CloseFile, epas_GetFileInfo, epas_Read, epas_Write, epas_DeleteDir, epas_ChangeDir, epas_Directory