[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1327
  • Last Modified:

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
0
muffish
Asked:
muffish
  • 4
  • 2
1 Solution
 
artokallioCommented:
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.

/R2
0
 
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
0
 
artokallioCommented:
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.

/R2
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
artokallioCommented:
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)

/R2

/R2
0
 
artokallioCommented:
cont'd
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.
/R2
0
 
muffishAuthor Commented:
thanks artokallio,
i will try your solution .

Thanks again
Mufaddal


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now