-
September 30th, 2003, 03:24 AM
#1
How to execute a 16-bit or DOS application in a 32-bit program?
I have a third party 16-bit/DOS application which runs fine in the DOS console under Win98. When using the system() or ShellExecute() to execute the third party app in my 32-bit program, an error "This program has performed an illegal operation and will be shutdown" occurred.
How should I make such a call for a 16-bit or DOS app?
Also can Visual Studio create a real DOS project?
-
September 30th, 2003, 03:46 AM
#2
I don't what is causing this problem, but try CreateProcess instead of ShellExecute.
You can create a console application (perhaps this is what you mean by a DOS project) with any version of VC: File->New->Projects tab->Win32 Console Application.
To create a 16 bit console application you need VC 1.52 (used to come with VC 5/6 I believe).
-
September 30th, 2003, 04:05 AM
#3
Sorry about that. I made a mistake in my coding.
Does it mean that Visual Studio can not create a real DOS project?
-
September 30th, 2003, 04:16 AM
#4
You need Visual C++ 1.52 to create a 16 bit application, which is probably what you mean by a real DOS app.
Why do you need to do this anyway? Perhaps there is another way round what you are trying to do?
-
September 30th, 2003, 04:18 AM
#5
Originally posted by Kurosan
Does it mean that Visual Studio can not create a real DOS project?
Not with the newer versions of the studio...as mentioned you need version 1.52...
-
September 30th, 2003, 05:09 AM
#6
My intention is to create an exe which can run upon system bootup using a bootable media. So i thought the exe need to be a DOS program running under RAM disk.
Any suggestion?
-
September 30th, 2003, 12:43 PM
#7
Re: How to execute a 16-bit or DOS application in a 32-bit program?
Originally posted by Kurosan
I have a third party 16-bit/DOS application which runs fine in the DOS console under Win98. When using the system() or ShellExecute() to execute the third party app in my 32-bit program
This should work. There must be another reason it is not working.
-
September 30th, 2003, 12:47 PM
#8
Originally posted by Kurosan
My intention is to create an exe which can run upon system bootup using a bootable media. So i thought the exe need to be a DOS program running under RAM disk.
What? I am very confused. You say you want to execute a 16-bit application from a 32-bit application and then you say you want to execute the 16-bit application "upon system bootup using a bootable media". Which do you want to do?
-
September 30th, 2003, 10:45 PM
#9
Sorry for the confusion.
I need to have two versions, one to run upon bootup (DOS environmnet) and the other to run under Windows environment.
-
September 30th, 2003, 11:05 PM
#10
The bootup problem is more of a legal one than a technical one. If you distribute a bootable copy of DOS then you are likely to have Microsoft chasing after you. So you need to find a legal solution.
If the reason you intend to make the non-bootable version also be 16-bit is because you want to have one program, then the requirements for the non-bootable version is dependent on the solution you use for the bootable version. You might not be able to have a common "binary" (compiled) version. You might need to make the two versions compatible only at the source code level.
I think you must first determine what is legally available for making a bootable disk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|