Solved

VC++ Writing a DOS Program

Posted on 1997-12-27
6
216 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

760 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

21 Experts available now in Live!

Get 1:1 Help Now