• C

Convert 16 bit Visual C program to 32 bit

hi there,
I have existing Visual C program which is 16 bit.
I need to convert it to 32 bit to make it compatible to run in Windows 2000.
It using Dialog editor tool to make the GUI.
I use nmake command from command promt to compile the program.
Also it using Oracle 7.2.3 client to connect to database ....

Thanks for all the help.
Mufaddal Shabbir
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Most Visual C (this would probably be Visual C/C++ 1.52, right?) programs can be converted into their Win32 equivalents by just creating a new project in the Visual Studio IDE. Since you have resources in your program, I would suggest that you'd create a normal workspace (probably MFC?) and insert all the relevant files there. It is much simpler to work in the VS IDE environment than accessing the project files from command line (of course, this is only an opinion).

If your code depends heavily on int being a 16-bit entity or similar 16-bit dependencies, you should first try to convert these into their short (16 bits) / long (32 bits) equivalents. Your program might have other platform specifics such as VBXs, but you can start dealing with those once you get the program first converted.

If you are using Oracle ODBC driver, you can continue using either the old 16-bit driver, or you can start using the 32-bit driver. The 16-bit ODBC support has been deprecated in MDAC 2.8, so you should use an earlier version.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
muffishAuthor Commented:
dear  artokallio,
thanks for your comments.
I tried using the same as u suggested.
I am creating new project in Visual Studio 6.
Then i converted all 16 bit funcs. to 32 bit.
But i am facing another problem is that the GUI is developed using Dialogeditor program. and the Visual Studio cannot read the resource file created by the dialog editor.

I was wondering if there is any tool available to convert dialog editor forms to readable forms by Visual Studio 6 ...

Thanks n Regards,
Mufaddal Shabbir
I am not aware of any such program right now, even if I am confident someone has written such a thing.
You're best off (generally) by importing the .rc file into Visual Studio. If there are any discrepancies, the resource compiler will complain, and you can deal with them one by one.

Get Cisco Certified in IT Security

There’s a high demand for IT security experts and network administrators who can safeguard the data that individuals, corporations, and governments rely on every day. Pursue your B.S. in Network Operations and Security and gain the credentials you need for this high-growth field.

Since you are using Microsoft tools, I would recommend the following to convert your Dialog Editor produced .RES file into .RC file which could be imported into Visual Studio 6.0:
1) open the .RES file in App Studio (APSTUDIO.EXE). You do not need to create any project or similar, just open the file for the current APP1 script
2) save under extension .RC; if you are using RESOURCE.H for something special, remember to make a backup copy; when the saving has created the RESOURCE.H, you can append your special information in your own RESOURCE.H into that.
3) import the resulted .RC file into the 32-bit project: the resource compiler will produce the 32-bit .RES file that is then automatically linked into the project.

If you do not have the 16-bit Visual Studio 1.x, you can find the required tool (APSTUDIO.EXE) in the 'net. As you own a later Microsoft toolchain already, I do not think that there are any copyright issues.

Other options such as using some resource decompiler exist, but this will probably give you the best results compatibilitywise (The main problems using generic resource editors/compilers/decompilers are those caused by different vendors [such as Borland] using slightly different conventions/directives within resource scripts)


You can also do this loading and saving of 16-bit resources from Visual Studio 6.0 itself, but I've had some bad experiences especially with larger resource files.
muffishAuthor Commented:
thanks artokallio,
i will try your solution .

Thanks again

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.