Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Installing a 16 Bit VB Application in 32 Bit System 2

Status
Not open for further replies.

TondoBoy

Programmer
Mar 22, 2001
31
US
Is it possible to run a 16 bit application in a 32 bit machine, like Windows 98 and Windows NT. The obvious answer could be NO!

I am really confused about this. I inherited a project written in VB4 using Access 2.0 and formula one. In an old machine the source code as well as executable were running fine until the hard drive was damaged. We replaced the hard drive and reloaded the softwares and VB source codes.

Here is the dilemma. Neither the source code nor the executable will run on the rebuilt machine with the 16 bit API calls and displaying object required errors. When I changed the API calls to 32 bit, the source code will run but the recompiled application will not. It also will not run on other windows 98 machines that is currently running the original 16 bit executable.

My expert resource person is saying that a 16 bit application will run on 32 bit machine but everyting I read is saying no. But...Why is the old 16 bit executable is running on the 32 bit machines. I was able to work an recompile the 16 bit application on the machine before the hard drive was damaged. Is there a way to have a machine run both 16 and 32 bit applications?

What am I missing here. I have been working on this for quite awhile and I need a definitive answer. H-e-l-p.

TONDOBOY

The original 16 bit executable is still running on other windows 98 machines but cannot be run on this machine.

 
I am still developing some 16-bit applications and they do run on Win95/98/NT/2000/ME. The secret? Develop them and compile them on Windows 3.1x. I have not had a problem doing it this way.

Stu.
 
I also use 16 bit vb, and havent had a problem except for stupid things that i did to cause them not to work in 32 bit machines
Dragnut
 
TondoBoy:

in reference to the error code...see your other posting.

based on the answer of the other post and some of the added info you mention here, I'm just wondering if there were CUSTOM CONTROLS ("#424 Object requested") created specifically for this app; or maybe you need an updated DLL file somewhere (maybe a bug fix for Access 2??) ?

Did you check for any Save-/Get-Settings? You are aware that VB4-16 uses INI files (unless you use an API call to store the info to the registry) and VB4-32 uses windows' registry instead?

Double check that all 16 api calls have indeed been converted to 32 bits.

Last thing (and this I would dred) trace EVERY SINGLE LINE.

Hope I've sparked an Idea,
--MiggyD
"The world shrinks more and more with every new user online."
 
MiggyD,
Thanks for advice. It confirmed that I took some of the right steps to find what was causing the error. I used both 16 and 32 bit API calls and it only works on 32 bit. On 32 bit these lines worked:

Public Type as TInitSettings
DBFilename as String
End Type
Public IniSettings As TInitSettings
..Other Syntax...
Function IniSettings()
Variables....
Result% = GetProfileString ("RTD Ledger","DBDirectory", "Default",tmpbuf$,128)
.....
.....
'Understandably, this 32 bit API call returns the correct lpReturnedString and it does not on 16 bit. I may have some DLL or OCX missing because if the above works on one Windows 98, 32 bit then it should work on other Windows 98, 32 bit machine. Oh, well.....Thank you again for the advice.





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top