• Welcome to Vice City Multiplayer.
 

About rcondll.dll (to developers)

Started by jansi, February 26, 2008, 08:58:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jansi

Hello!

I'm trying to create an rcon client that's using the rcondll.dll (I don't want to learn the r.a.k.n.e.t yet) and I've got a problem with receiving messages from the dll. I can connect to the vc:mp server, send commands (for example, "kick 0") and disconnect, but I don't receive any rcon output (like "[join] 0 Player" or "RCON: Kick Usage: kick <playerid>").

To send something back to the mIRC it should create a mapped file named "mIRC", copy all the commands to this file, and send a Windows message WM_USER+200 (or 201) to the mIRC. When mIRC receives this kind of message, it reads commands from the mapped file and deletes the file. (This information is from the mIRC's help)
But my application doesn't receive any WM_USER+200 or +201 messages from the dll, while it does from other app`s. So maybe the problem is with the window's handle - rcon.dll sends messages to some other (wrong) window.

dll has a function inside that creates mapped file and sends the message, so it must be using the way described in mIRC help, but I don't know how it obtains the handle of the target window - ways I can think of are:
- it can search for a window with certain ClassName, FileName or Title;
- it can use the hwnd parameter passed through RconConnect function;
- it can use the hwnd variable from the LOADINFO struct ( used in LoadDll function ).
- it's using GetProcessWindowStation and GetUserObjectInformation functions (I'm not sure why?)
But maybe there is another way that I haven't thought about!?

In the end - can you tell me how the .dll gets a handle of the mIRC window??

.

Mex

Quote from: jansi on February 26, 2008, 08:58:03 PM
I can connect to the vc:mp server, send commands (for example, "kick 0") and disconnect, but I don't receive any rcon output (like "[join] 0 Player" or "RCON: Kick Usage: kick <playerid>").

I know this is obvious but just double check you are using the correct DLL version.
On the homepage there is one under "0.1 downloads" which is the old version.  I downloaded this one the other day (not knowing it was an old version), and i could connect to the server but not do certain commands.
The latest version is under "VC:MP 0.3 is released!"

jansi

The problem is that I can do the commands (and they work), but I can't get their results and chat.
(And it's the same with both, old and new, dll versions.)