VB.NET
Dim EventOn, Ret As Integer
EventOn = 1 ' Event generation
Ret = GpSetEvent(EventOn)
' The routine which receives an event
Select Case message ' the 2nd argument which a program in execute receives.
Case WM_USER + &H30S ' WM_USER + 0x30 is a setting up value in GpSetEventSrq function.
' At necessary processing a description.
Ret = GpEnableNextEvent()
End Select
C
DWORD EventOn, Ret;
EventOn = 1; /* Event generation */
Ret = GpSetEvent(EventOn);
/* The routine which receives an event */
switch(message){ /* the 2nd argument which a program in execute receives. */
case WM_USER + 0x30: /* WM_USER + 0x30 is a setting up value in GpSetEventSrq function. */
/* At necessary processing a description.*/
Ret = GpEnableNextEvent();
break;
}
C#
uint EventOn, Ret;
EventOn = 1; /* Event generation */
Ret = gpib.SetEvent(EventOn);
/* The routine which receives an event */
switch(message){ /* the 2nd argument which a program in execute receives. */
case WM_USER + 0x30: /* WM_USER + 0x30 is a setting up value in gpib.SetEventSrq function. */
/* At necessary processing a description.*/
Ret = gpib.EnableNextEvent();
break;
}
Python
EventOn, Ret = ctypes.c_ulong(), ctypes.c_ulong()
EventOn.value = 1 # Event generation
Ret.value = GpibPy.GpSetEvent(EventOn)
# The routine which receives an event
# the 2nd argument which a program in execute receives.
if message == (WM_USER + 0x30): # WM_USER + 0x30 is a setting up value in GpSetEventSrq function.
# At necessary processing a description.
Ret.value = GpibPy.GpEnableNextEvent()