Setup Example

image\head10.gif VB.NET

Dim hWnd As Integer

Dim wMsg As Short

Dim DecOn, Ret As Integer

 

hWnd = Handle.ToInt32 ' Handle is handle of executing procedure.

wMsg = WM_USER + &H32S ' A random number of 0x400-0x7FFF

DecOn = 1 ' Event of DEC(Device clear) generation

Ret = GpSetEventDec(hWnd, wMsg, DecOn)

 

image\head10.gif C

HANDLE hWnd;

WORD wMsg;

DWORD DecOn, Ret;

 

hWnd = hDlg; /* hDlg is handle of executing procedure.*/

wMsg = WM_USER + 0x32; /* A random number of 0x400-0x7FFF */

DecOn = 1; /* Event of DEC(Device clear) generation */

Ret = GpSetEventDec(hWnd, wMsg, DecOn);

 

image\head10.gif C#

int hWnd;

ushort wMsg;

uint DecOn, Ret;

 

hWnd = this.Handle.ToInt32(); /* this.Handle is handle of executing procedure.*/

wMsg = WM_USER + 0x32; /* A random number of 0x400-0x7FFF */

DecOn = 1; /* Event of DEC(Device clear) generation */

Ret = gpib.SetEventDec(hWnd, wMsg, DecOn);

 

image\head10.gif Python

wMsg = ctypes.c_ushort()

DecOn, Ret = ctypes.c_ulong(), ctypes.c_ulong()

 

hWnd = ctypes.windll.user32.FindWindowW(0, "Name") # "Name" is caption of executing procedure.

wMsg.value = WM_USER + 0x32 # A random number of 0x400-0x7FFF

DecOn.value = 1 # Event of DEC(Device clear) generation

Ret.value = GpibPy.GpSetEventDec(hWnd, wMsg, DecOn)