ncCloseObject (Close)

NI-DNET Programmer

ncCloseObject (Close)

Purpose

Close an NI-DNET object.

Format

LabVIEW

C

NCTYPE_STATUS ncCloseObject(NCTYPE_OBJH ObjHandle)

Input

ObjHandle Object handle of an open Interface Object, Explicit Messaging Object, or I/O Object

Output

None

Function Description

The ncCloseObject function closes an NI-DNET object when it no longer needs to be in use, such as when the application is about to terminate. When an object is closed, NI-DNET stops all pending operations for the object, and you can no longer use the ObjHandle in your application.

If the object specified by ObjHandle has a notification pending, ncCloseObject disables the notification by implicitly calling ncCreateNotification with DesiredState zero.

When ncCloseObject has been called for all open NI-DNET objects, NI-DNET stops all DeviceNet communication (ncCloseObject issues an implicit call to ncOperateDnetIntf with Opcode NC_OP_STOP).

Parameter Descriptions

ObjHandle

Description ObjHandle must contain an object handle returned from the ncOpenDnetIntf, ncOpenDnetExplMsg, or ncOpenDnetIO function.
Values The encoding of ObjHandle is internal to NI-DNET.

Examples

LabVIEW

Close an NI-DNET object.

C

Close an NI-DNET object.

NCTYPE_STATUS	status;
NCTYPE_OBJH	objh;
status = ncCloseObject (objh);