Al_releasedevice – Measurement Computing ADLIB WIN User Manual

Page 49

Advertising
background image

Chapter 12 Logical Device String Names

11-3

11.2 AL_ReleaseDevice

Prototype

C\C++

ERRNUM

AL_ReleaseDevice(LHLD

lhld);


Visual Basic for Windows

Function

AL_ReleaseDevice(ByVal

lhld As Long) As Long

LHLD lhld

handle of the LDSD to be released


The AL_ReleaseDevice function releases a logical device subsystem database (LDSD) and all associated
memory previously allocated to the device. Further calls to the LDSD will return an invalid LHLD error
code, all previously returned pointers from the LDSD to the user application that provide access to the
device or its data buffers are considered invalid (NULL) and must not be used by the application program.

Parameter Description

lhld

Identifies the instance of the logical device subsystem to be released.


Returns:
On success ERRNUM is set to 1, otherwise ERRNUM contains the last error code that occurred during the
call.

Notes

If the device is currently running, an error flag setting determines whether to stop and then release, or to
return a non-critical error and keep the device running. See the function AL_SetErrorOnReleaseRunning
for more information.

Related Functions:
AL_AllocateDevice

Program References:
ALL

Supported Logical Device Subsystems:
All

Advertising