Oc_openscanner -48 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 102

Advertising
background image

OC_OpenScanner

Library of Routines

6–48

Publication 1747-6.5.3 June 1998

OC_OpenScanner

OC_OpenScanner acquires access to the scanner device and sets a unique ID that
the application uses to access the scanner in subsequent functions.

Syntax:

DOS int

OC_OpenScanner(HANDLE *handle, 0, 0);

NT

int

OC_OpenScanner(HANDLE *handle);

Important:

The two argument values of zero are ignored by the DOS API
function.They are a carryover from the Open Controller API.

Description:

This function must be called before any of the other scanner access functions can be used.

Return Value:

Considerations:

Supported in the DOS API library and the Windows NT API library

Example:

HANDLE

Handle;

int

retcode;

retcode = OC_OpenScanner( &Handle, 0, 0 );

!

ATTENTION:

After OC_OpenScanner has been called, OC_CloseScanner must be called before

exiting the application.

Name:

Value:

Description:

SUCCESS

0

scanner was opened successfully

ERR_OCOPEN

1

scanner is already open

ERR_OCMEM

3

shared memory not found

Advertising
This manual is related to the following products: