Programming IP under DOS with C or C++

Programming IP under DOS with C or C++

Post by Hugo » Wed, 08 Feb 2006 04:43:50

Hello everyone,

I really need your help!! I've used this groups to learn and get me out

of troubles but this is my first time writing a subject.

My problem is that I need to make a C program that run in DOS and
comunicates to another program made in VB.Net 2005 trougth IP. I use
Borland C++
5.02 but I not even sure if it would run in DOS. I also have Visual
C++ but I don't know wich one should I use.

So I need your help in two things:

1) Would a program made in Borland C++ 5.02 or Visual C++ run under

2) Most Important: I need some kind of guide to make a program that
uses IP in order to get comunicate with another program.

I'd appreciate your help since I'm in a rush at work

Thanks you so much...

P.D.: I posted this problem in a C group and I didn't get a good
treat... I apologize to you if this question is "out-off-topic" as the
people from the other group told me...

Programming IP under DOS with C or C++

Post by Ant » Wed, 08 Feb 2006 11:06:29

I think you can create 16 bit DOS programs with BC 5.02, but perhaps
not later versions. The last release of VC++ capable of doing this was
version 1.52. In any case, free DOS compilers are available, but your
problem is likely to be support for TCP/IP networking in DOS.

Can't really help you there, but you would need a TCP/IP stack/driver
and function library for DOS first, and that would depend on which
brand/version of DOS you're talking about. There's no built-in TCP/IP
support in VC 1.52, but I don't know about Borland. Google might turn
up an implementation.


Programming IP under DOS with C or C++

Post by Bob McConn » Wed, 08 Feb 2006 12:33:14

Any language in Visual Studio will only build programs for Windows. I
think VC++ 1.52 was the last one that would build DOS applications.

BC++ will create programs for DOS when you select 16-bit real mode. I
have used version 4.5 for that, but have not tried 5.0.

The second thing you will need for DOS is an IP stack. It doesn't come
with one, although Microsoft did distribute LanManager drivers that
sort of worked if you didn't need a lot of memory for your
applications. You would probably be better off with the crynwr packet
drivers or WATTCP. In fact, you might look at the latter with the open
source WATCOM compiler. That combination could be the easiest way to
build DOS based TCP/IP applications.

I have also used DR-DOS 5.0 with Novell's Lan Workplace SDK. But those
are no longer available. I think DR-DOS 7.01 is still available with
some old Novell drivers, but I have not looked at that combination.

Another option is embedded Linux instead of DOS. But if you go down
that path, be prepared to throw out Windows once you find out how good
Linux really is.

Make sure you take a good look at the license for each package before
you decide. Some of them might restrict how you distribute the results
in a commercial setting.

Bob McConnell

Programming IP under DOS with C or C++

Post by William J. » Wed, 08 Feb 2006 13:28:15

Take a look at TinyFTP / TinyTCP.

I looked over the code some time ago, and it seems nicely done. But...

I'm not sure about the implications of using this in a commercial project.

I saw it. It was off topic over there. I'd have suggested you come over here
myself if someone else hadn't done so first.

- Bill

Programming IP under DOS with C or C++

Post by BLE_Macie » Fri, 17 Feb 2006 20:06:55

6 Feb 2006 11:43:50 -0800 jednostka biologiczna o nazwie "Hugo"
< XXXX@XXXXX.COM > wyslala do portu 119
jednego z serwerow news nastepujace dane:

Yes, BC 5.02 allows compiling 16-bit DOS programs (but I personally
prefer using BC3.1 to develop DOS programs, because of it's nice IDE).