How to make 2 programs interact?

Started by
26 comments, last by RoTTer 23 years, 10 months ago
Hello! Im trying to make a program that changes some data on a second program. Er, something like this : Someone runs my program and then my program launches the "X" game. And then my program draws some stuff on X''s window, changes it''s title, etc. Well what I want to do is something like UO Assist, UO Extreme and UO Plugin (programs that interact with Ultima Online), if you have used any of those. I want, also, to be able to modify the packets that are being received by X and also the packets being sent to X. I would guess this is a very hard thing to do, and I have little/none Winsock programming experience, but a bit on Windows programming (and DX). Any help would be very helpful (errm ). Thanks a lot for your time. Cya, -RoTTer
Advertisement
Actually all but the interupting packets is quite easy. You can use API calls to find windows (I think it''s called FindWindow) And you can use API calls like SetWindowCaption, SetWindowColor, etc... to change properties of that window. Now getting all the packets to go through you is tricky, I''ve heard of people creating their own Winsock DLL''s with identical procedures as the normal Winsock, however that''s loads of work. Not sure what else, I''m no winsock expert either, but maybe there''s a buffer you can check before it''s sent or something...
Hope that helped!
See ya,
Ben
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
Being someone who likes to crack multiplayer games and annoy people online I have a lot of experience in this.

There are many ways to communicate with other programs, but you don''t want to hear about any of the conventional ways since they require that the other program want to communicate.

To reroot input use hooks (I think something like SetHookEx). To resend them use mouse_event and keybd_event. If you want to modify memory use WriteProcessMemory and ReadProcessMemory.

Modifing packets is a little harder. Especially since a lot of games encrypt them, or have a checksum byte. I have a winsock replacement dll, but I lost the source code. I also have a program that I wrote that helps me write a proxy dll for any dll (works on cinderella programs too). I''ll see if I can find the source code for it.
For a good time hit Alt-F4! Go ahead try it, all the cool people are doing it.
Yay

I was curious to know how these things could be done...
Though I still have a few doubts on how to do some things...

Per chance, would any of you know where I can find further information about this? An online tutorial would be great...

Thanks a lot!
I don''t think there is anything like that. You''re starting to get into the poorly documented API functions, the ones microsoft doesn''t want you to use. There are a lot of them. There''s a way to disable ctrl-alt-delete. There''s one to eject a cd from the cd drive. Using hooks I''ve made a program to rearrange the keys on the keyboard. I''ve made a program to make the mouse drunk, and there are ways to get programs to run on start up. Oh good times.

For a good time hit Alt-F4! Go ahead try it, all the cool people are doing it.
For a good time hit Alt-F4! Go ahead try it, all the cool people are doing it.
I got three words for that: DDE

------------------------
Captured Reality.
How do you plan on getting it to start a DDE server? Copy / Paste?

For a good time hit Alt-F4! Go ahead try it, all the cool people are doing it.
For a good time hit Alt-F4! Go ahead try it, all the cool people are doing it.
Well, if you write both programs, why don''t you check out the IPC (InterProcess Communications) topics in the Platform SDK docs? That''s why it exists, to make 2 programs able to communicate.


Regards,
Laarz
Regards,Laarz
The idea was to gain control over a 3rd party software. Unfortunately they didn''t include any feature that could make our work easier...

Well... if we have only 2 way outs (ReadProcessMemory or using Winsock) I guess we will have work for some months here... EEEK.

The packets are strongly encrypted...

I beg you! Please, isn''t there an easier way? hehehe
Hey!

Tons of answers, nice! =]

Thanks a lot for every one who took their time to read and/or reply to my message.

What exactly I plan to do is something like this :
Attach a menu to the X-game window (which is a game made by someone else, not me, answering to one of the questions), and then read the WM_CMD''s received by that program. Is this possible (I mean, read which messages are the program receiving) ?? If not, what I want to do is simply draw some stuff (Like an info box) and maybe change the text in X-game title bar (And leave the attached menu to my own program).

About modifying packets, I think this would be very important to get the program running, but it seems that it will be not that easy to do this =/, so I might just forget this for a while (while I learn about Winsock programming ).

nes8bit (or blue-lightning) : What is a DDE server? =] Im sorry about my ignorance heh.

Thanks a lot! Cya,
-RoTTer

This topic is closed to new replies.

Advertisement