LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Break Telnet Connection

Hello,
How is it possible to send a break signal like 'Ctrl-]' or 'Ctrl-Break' in the HyperTerm with the command InetTelnetWrite???
0 Kudos
Message 1 of 2
(3,190 Views)
How about using

FakeKeystroke (0);

and the revevant code as listed below.


Form key codes by a logical OR operation on values representing a modifier key and either an ASCII character or a virtual key.

A modifier key is a shift key or a menu modifier key (the key). The following constants represent the modifier key.

VAL_SHIFT_MODIFIER = 0x010000
VAL_MENUKEY_MODIFIER = 0x030000

ASCII characters can be represented by a literal character, for example, 'A' or 'D', or an ASCII value. There is no distinction between upper and lower case ASCII characters.

Virtual keys are non-ASCII keys represented by the following key codes:

VAL_FWD_DELETE_VKEY = 0x0100
VAL_BACKSPACE_VKEY = 0x0200
VAL_ESC_VKEY = 0x0300
VAL_TAB_VKEY = 0x0400
VAL_ENTER_VKEY = 0x0500
VAL_UP_ARROW_VKEY = 0x0600
VAL_DOWN_ARROW_VKEY = 0x0700
VAL_LEFT_ARROW_VKEY = 0x0800
VAL_RIGHT_ARROW_VKEY = 0x0900
VAL_INSERT_VKEY = 0x0A00
VAL_HOME_VKEY = 0x0B00
VAL_END_VKEY = 0x0C00
VAL_PAGE_UP_VKEY = 0x0D00
VAL_PAGE_DOWN_VKEY = 0x0E00
VAL_F1_VKEY = 0x0F00
VAL_F2_VKEY = 0x1000
VAL_F3_VKEY = 0x1100
VAL_F4_VKEY = 0x1200
VAL_F5_VKEY = 0x1300
VAL_F6_VKEY = 0x1400
VAL_F7_VKEY = 0x1500
VAL_F8_VKEY = 0x1600
VAL_F9_VKEY = 0x1700
VAL_F10_VKEY = 0x1800
VAL_F11_VKEY = 0x1900
VAL_F12_VKEY = 0x1A00

ASCII cannot be used with a virtual key code.

Virtual key codes can be used with or without a modifier.

The shift and menu modifier keys can be used together.

For example, the expression VAL_MENUKEY_MODIFIER | 'A' specifies . Other valid key codes include the following:

VAL_TAB_VKEY
VAL_SHIFT_MODIFIER | VAL_F5_VKEY

The result of the logical OR operation is a 4-byte integerconsisting of three bit fields, 0x00MMVVAA, where

MM = the modifier key
VV = the virtual key
AA = the ASCII key
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 2
(3,166 Views)