GpibInit


Function

Opens file and makes device usable.
To access a device, it is necessary to perform this function first. 

Format

Ret = GpibInit ( DeviceName , DevId )

Parameter

DeviceName [ VB.NET: String ][ C, C++: char * ][ C#: string ]

Specifies device name set in configuration tool.

DevId [ VB.NET: Short ][ C, C++: short * ][ C#: out short ]
Specifies address of variable for storing Device ID.
The subsequent functions can access the device by using the value stored in this variable.

Return Value

Ret [ VB.NET: Integer ][ C, C++: long ][ C#: int ]

 

0

Normality completion

1

Failed in retrieve resource

2

Failed in register interrupt routine

3

Failed in the allocation of the memory

10000

The device name was specified which wasn't registered

10002

Driver can not be called

10003

Failed in the opening of the file

10161

A device name isn't stored in DeviceName

10162

Pointer to Id is NULL

Initial Value

None

Remarks

This function runs at the beginning in your application.

Example

Performs initialization for device whose device name is [Gpib000].

C

short DevId;

Ret = GpibInit ( "Gpib000" , &DevId );

See Also

GpibExit