Adm api initialization functions – ProSoft Technology MVI69-ADM User Manual

Page 123

Advertising
background image

MVI-ADM ♦ 'C' Programmable

Application Development Function Library - ADM API

'C' Programmable Application Development Module

Developer's Guide

ProSoft Technology, Inc.

Page 123 of 342

February 20, 2013

7.2

ADM API Initialization Functions

ADM_Open

Syntax

int ADM_Open(ADMHANDLE *adm_handle);

Parameters

adm_handle

Pointer to variable of type ADMHANDLE

Description

ADM_Open acquires access to the ADM API and sets adm_handle to a unique
ID that the application uses in subsequent functions. This function must be called
before any of the other API functions can be used.

IMPORTANT: After the API has been opened, ADM_Close should always be called before exiting
the application.

Return Value

ADM_SUCCESS

API was opened successfully

ADM_ERR_REOPEN

API is already open

ADM_ERR_NOACCESS

API cannot run on this hardware

Note: ADM_ERR_NOACCESS will be returned if the hardware is not from ProSoft Technology.

Example

ADMHANDLE adm_handle;
if(ADM_Open(&adm_handle) != ADM_SUCCESS)
{
printf("\nFailed to open ADM API... exiting program\n");
exit(1);
}

See Also
ADM_Close (page 124)

Advertising