Closing a dataset -7, Acquiring error information -7, Closing a dataset) – HP XP20000XP24000 Disk Array User Manual

Page 161: See section acquiring error information), Closing a dataset, Acquiring error information

Advertising
background image

Performing File Access Library (FAL) Operations

6-7

Hitachi USP V Cross-OS File Exchange User’s Guide

Closing a Dataset

datasetError = datasetClose (datasetHandle)

The datasetClose function closes the dataset specified by datasetHandle,

which is returned by the datasetOpen function. Table 6-4 shows the
datasetClose arguments and return values.

Table 6-4

DatasetClose Function

Item Value

Type

Description

Argument

datasetHandl
e

DATASET_HANDLE

The datasetHandle value returned by the datasetOpen
function.

Return value 0

-1

Normal end

Error end

When the datasetClose function terminates successfully, it returns a value of
0. If it terminates unsuccessfully, it returns a value of -1. To get the error

code information, execute the datasetGetLastError function (see section
Acquiring Error Information).

Acquiring Error Information

datasetLastError = datasetGetLastError()

The datasetGetLastError function acquires the error code information for the

most recent error. Errors in FAL functions are defined in dataset.h (see
Appendix C). Errors in UNIX are defined by a standard error file (errno.h).
Errors in Windows 2000/2003/Windows NT systems are defined by errno.h

attached with Microsoft Visual C++. Table 6-5 shows the datasetClose
arguments and return values.

Table 6-5

DatasetGetLastError Function

Item Value

Type

Description

Argument none

Return value

datasetLastError

Long

Error code

Advertising