M
Morten Wennevik
I made a program than can send text to Putty (A telnet/ssh client)
http://www.chiark.greenend.org.uk/~sgtatham/putty/
And I discovered that Unicode characters doesn't reach it
I'm using PostMessage with WM_CHAR, the text source is taken straight
from a textbox and sent character by character to putty (putty handle is
previously found with FindWindow)
private void sendText(string text)
{
foreach(char ch in text)
{
Win32.PostMessage(puttyHandle, 0x0102, ch, 0);
}
}
PostMessage is defined in Win32 namespace
0x0102 is WM_CHAR
[DllImport("User32.Dll")]
public static extern bool PostMessage(int hWnd, int Msg, int WPARAM, int
LPARAM);
ch is unicode, while it never reaches putty as one?
Am I doing something wrong?
(There is a possibility that putty doesn't treat WM_CHAR properly. I've
checked the source code for it, and found it converts wPARAM to unsigned
char)
http://www.chiark.greenend.org.uk/~sgtatham/putty/
And I discovered that Unicode characters doesn't reach it
I'm using PostMessage with WM_CHAR, the text source is taken straight
from a textbox and sent character by character to putty (putty handle is
previously found with FindWindow)
private void sendText(string text)
{
foreach(char ch in text)
{
Win32.PostMessage(puttyHandle, 0x0102, ch, 0);
}
}
PostMessage is defined in Win32 namespace
0x0102 is WM_CHAR
[DllImport("User32.Dll")]
public static extern bool PostMessage(int hWnd, int Msg, int WPARAM, int
LPARAM);
ch is unicode, while it never reaches putty as one?
Am I doing something wrong?
(There is a possibility that putty doesn't treat WM_CHAR properly. I've
checked the source code for it, and found it converts wPARAM to unsigned
char)