I am in the process of making an application which I am hoping will become a GUI for QStat (a DOS based application which retrieves the current status of an online game server).
The problem I have is this:
I can run the QStat application as normal (including the command line stuff - IP address etc) and it shows me the results in the DOS type window. My aim is to have a VB6 front end which I have a list of IP addresses in, which when I double click one, it calls on the QStat application and then displays the result in a more user friendly format in my VB6 window.

I was wondering if anyone knew where to start with this? Any websites which could help?
I've spent a fair bit of time today trawling through Google for links to help me out but all I am getting is how to provide commands to a VB6 application on loading (which is not what I want!)

I will provide more info if needed including some source code from where I am upto currently.

Thanks in advance,

10 Years
Discussion Span
Last Post by Kevin B.

You can download the C source code for QStat from here. All you have to do is port it to VB and you won't have to hack away at it. Or port it to C# which might be even easier to do.


You can download the C source code for QStat from here. All you have to do is port it to VB and you won't have to hack away at it. Or port it to C# which might be even easier to do.

I presume that there is no easy way of porting the code from C to VB and I would therefore need to know more than the tiny bit of C that I currently know?
I'm not exactly fantastic on VB either, but am trying to push my knowledge further all the time to learn new stuff :)

If for example I wanted to query a different DOS application where source was not available? Am I able to claim the text from the application into the VB6 application? Or is it not possible at all?


you might try using named pipes. I have not tried it but you might experiment with it to see if it will work for you.

Ouch, that looks complex (to say the least!)
I'll give it a go though, and if I figure it out and get it working, I'll post how I did it :)

I've been searching around with various criteria, but I didn't really know how to describe what I wanted in such a way that google or the forum search could understand...


I haven't looked through the QStat sources (and I don't plan to), but if it really is just a plain-vanilla command-line application then you only need to spawn it as a subprocess, and re-route its standard input and output to your application.

Look through the docs for CreateProcess.

Hope this helps.

Votes + Comments
Thanks for your advice and URL for more info. Much appreciated :)

I have found that if I can get the application to dump it's results to a text file, I should be able to use that as input.
I won't mark it as solved just yet, but will have a go at it over the coming weekend (not had the chance to do much digging into new things during the week) and post back my results if I can.

Thanks again to you all who have posted for your input and advice, Unfortunately I'm still learning so it will take some time to pick up the more complicated options given.


I was thinking about running a command line application from within a VB box so that I could store command line options etc., and I stumbled across your question.

Here is a very promising link that I found. As I say, I haven't actually started yet, but I think this will get me most of the way to what I want...


I'll check back when I've actually written my code and see how you got along.


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.