Solved

VC++ Writing a DOS Program

Posted on 1997-12-27
6
229 Views
Last Modified: 2012-06-27
I just got Microsoft Visual C++ 5.0 a few days ago.  I've been all through the help screens and the project settings boxes, etc.  All I want to know is how do I set MSVC++ 5.0 to create programs that can be run in MS-DOS mode?
0
Comment
Question by:Egore
6 Comments
 
LVL 7

Expert Comment

by:galkin
ID: 1177090
You must create console application. Go to File->Open->New.... In opened dialog box click Projects tab and from list box select "Win32 Console application". Click OK button and skeleton console application will be generated. Then you can write main() function etc. what you usually do in DOS applications.
0
 
LVL 3

Author Comment

by:Egore
ID: 1177091
I tried this, but it did not work.  When I try to use it in the dos prompt it tells me that it cannot be run in DOS mode.  Also, if you answer this, I'll up the points, to use 'union REGS regs' do you need to compile as a DOS program?  Because, when I compile it in VC++ 1.0 as a DOS program it works just fine, but in VC++ 5.0 as whatever the default is, it screams at me when I use 'union REGS regs'.
0
 
LVL 5

Expert Comment

by:yonat
ID: 1177092
VC 4.2 and later do not support 16-bit applications. If you want to write 16-bit applications, use VC 4.1 or 1.52.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
ID: 1177093
No, the only version of Visual C++ that supports DOS applications is VC++ 1.x (1.52c was the last version).

You cannot use Visual C++ 2.x, 4.x, or 5.x to create DOS applications.


0
 
LVL 3

Author Comment

by:Egore
ID: 1177094
Well, I was really hoping this wouldn't be the case...  But, thanks anyway.  I'm only giving you an acceptable rating because, well, you didn't really tell me how...  But, thank anyway...
0
 

Expert Comment

by:rafekemmis
ID: 8103172
I have designed a C++ application that creates some REG files and BAT files which are needed for the loading process for 80+ XP machines. My problem is that this application must run in DOS MODE. I am currently using Visual Studio 7 which doesn't seem to support this. Are there any alternatives that can support my use of the conio library? I appreciate any help you can give.
R
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
std::atomic with custom class 6 190
SetCurrentDirectory path limit 7 106
mixing C++ & C# in Vis Studio 2013 7 142
best sources to up-to-date in C++? 8 72
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now