SendMessage() and PostMessage()

Questions about Wine on Linux
Post Reply
zelo66
Newbie
Newbie
Posts: 2
Joined: Sat Jun 27, 2020 10:57 am

SendMessage() and PostMessage()

Post by zelo66 » Sat Jun 27, 2020 11:24 am

Hey,


On Windows I have a program written in Visual Basic that communicates with the gameserver
using the SendMessage () function.
(First finds the server window (this is the console window, so it is ConsoleWindowClass) using FindWindow () and then sends text commands.
Everything works beautifully on windows, but not on wine

This is the command I use:
SendMessage (vHwnd, WM_CHAR, Asc(99), CInt (0 &))


For example, you can use this program:
https://tools.stefankueng.com/SendMessage.html

Message: WM_CHAR
WPARAM: 99 to send to the console, for example, the letter C


Run cmd using the wineconsole cmd command

And try to find them and send a message ... Everything works on windows, but not on Linux.

How can this problem be solved?

fargodwe
Level 4
Level 4
Posts: 194
Joined: Mon Oct 02, 2017 7:08 am

Re: SendMessage() and PostMessage()

Post by fargodwe » Tue Jun 30, 2020 5:34 pm

What exactly are the details for what fails? The sample pointed to by your link is a windowed program. You say yours in command line based?

I tried the sample program from the link and it runs but shows a completion code of zero which looks like it means it failed on the sendmessage.

So, is there perhaps a dll or two you need to include? if you use visual studio I think you can check those it is using in merge or some such place (I don't have it running under wine yet and don't currently have a Winodws PC anymore). Look at those then via winetricks see if they show as something you need to install.

zelo66
Newbie
Newbie
Posts: 2
Joined: Sat Jun 27, 2020 10:57 am

Re: SendMessage() and PostMessage()

Post by zelo66 » Fri Jul 03, 2020 5:43 am


fargodwe
Level 4
Level 4
Posts: 194
Joined: Mon Oct 02, 2017 7:08 am

Re: SendMessage() and PostMessage()

Post by fargodwe » Sat Jul 04, 2020 6:51 am

So, I'm confused. It's obviously a gui'd program. Just Visual Basic would indicate that. It looks to me as your samples in your recorded videos for how it should look is running the GUI I' a little confused when you say "only in windows console". Why not just run it as the GUI as per a normal wine installed program? Paste back a copy of your windows console so we can see what you mean by that.

Post Reply