beautypg.com

Makenewdevice – Measurement Computing Personal488 rev.3.0 User Manual

Page 97

background image

Personal488 for Windows 95/98/Me/NT/2000

04-10-01

API Reference 6-29

MakeNewDevice

Syntax

DevHandleT WINAPI MakeNewDevice(LPSTR iName, LPSTR aName,BYTE

primary,BYTE secondary,TermPT In,TermPT Out,DWORD
timeout);

devHandle

refers to the new external device.

iName

is the user name of the interface on which the device is to be created.

aName

is the user name of the device.

primary

and

secondary

are the secondary and primary bus addresses to be specified.

For no secondary address, a

-1

must be specified.

In

and

Out

are pointers to terminator structures specified to set up the respective input and

output terminators of the device.

tOut

is the timeout parameter to be specified.

Returns

-1

if error

otherwise, the

DevHandleT

of the new device, based on the parameters specified.

Bus State

None

Example

DevHandleT anotherDevice;

anotherDevice =

MakeNewDevice(“IEEE0”,
“Scope”,13,-1,NULL,
NULL,10000);

Specifies parameters for: Pointer to the interface,

pointer to the device name,

primary

and

secondary

addresses, pointers to the term

In

and

Out

structures, and timeout in

milliseconds.

See Also

MakeDevice, KeepDevice, RemoveDevice, OpenName, Close

This is a new function in Driver488/W95 and in Driver488/WNT. This function is similar to the

MakeDevice

function except that

MakeNewDevice

will create a new device based on the parameters

specified, instead of simply cloning an existing device.

The

MakeNewDevice

command does not save the parameters of the newly created device in the system

registry. To keep the device, it is necessary to call the

KeepDevice

function.

Note:

The

MakeNewDevice

command will only create, not save, a new device. Interface

descriptions are created and maintained by the configuration utility and the IEEE 488
configuration applet in the Windows Control Panel.

This manual is related to the following products: