Caninstallevent() – ADLINK PCI-7841/cPCI-7841 User Manual

Page 49

Advertising
background image

Function Reference

41

//

You need not to call ResetEvent()…..

err=CanRcvMsg(handle,&rcvMsg[0]
[rcvPatterns[0]]);
rcvPatterns[0]++;
}
cout1 = CanGetRcvCnt(handle[0]);
//

To retrieve number of unread

//

in the FIFO

CanInstallEvent()

Purpose

Install the event under Windows 95/98/NT
system

Prototype

C/C++ (Windows 95/98/NT)
int CanInstallEvent(int handle, int index,
HANDLE hEvent);

Parameters

handle : handle retrieve from CanOpen-
Driver()
Index : event type

HEvent : HANDLE created from Cre-
ateEvent()(Win32 SDK)

Return Value

Return 0 is successful
-1 if error occurs

Remarks

Install the notify event
Unlike the Dos environment, there is only
one error handling function under Windows
95/98/NT environment. First you need to
create an event object, and send it to the
DLL. The DLL would make a registry in the
kernel and pass it to the VxD(SYS in NT

Index

Type

2

Error Warning

3

Data Overrun

4

Wake Up

5

Error Passive

6

Arbitration Lost

7

Bus Error

Advertising