VB.NET
Dim Ret, Srlen, Cmd(31) As Integer
Dim Srbuf As New String("", 256) /* Receive buffer */
Cmd(0) = 2 ' Number of talkers and listeners (in master mode)
Cmd(1) = 3 ' Talker address
Cmd(2) = 1 ' Listener address
Srlen = 256 ' Maximum data length in bytes that can be received
Ret = GpListenEx(Cmd, Srlen, Srbuf)
C
DWORD Ret, Cmd[31], Srlen;
char Srbuf[256]; /* Receive buffer */
Cmd[0] = 2; /* Number of talkers and listeners (in master mode)*/
Cmd[1] = 3; /* Talker address */
Cmd[2] = 1; /* Listener address */
Srlen = 256; /* Maximum data length in bytes that can be received */
Ret = GpListenEx(Cmd, &Srlen, Srbuf);
C#
uint Ret, Srlen;
uint[] Cmd = new uint[31];
StringBuilder Srbuf = new StringBuilder(256); /* Receive buffer */
Cmd[0] = 2; /* Number of talkers and listeners (in master mode)*/
Cmd[1] = 3; /* Talker address */
Cmd[2] = 1; /* Listener address */
Srlen = 256; /* Maximum data length in bytes that can be received */
Ret = gpib.ListenEx(Cmd, out Srlen, Srbuf);
Python
Ret, Srlen, Cmd = ctypes.c_ulong(), ctypes.c_ulong(), (ctypes.c_ulong * 31)()
Srbuf = (ctypes.c_ubyte * 256)() # Receive buffer
Cmd[0] = 2 # Number of talkers and listeners (in master mode)
Cmd[1] = 3 # Talker address
Cmd[2] = 1 # Listener address
Srlen.value = 256 # Maximum data length in bytes that can be received
Ret.value = GpibPy.GpListenEx(Cmd, ctypes.byref(Srlen), Srbuf)