Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Upgrading 16 bit to 32 Bit

Posted on 1999-07-27
7
Medium Priority
?
182 Views
Last Modified: 2010-04-30
I have some VB apps that I have to upgrade to 32 bit from 16 bit.  There are lots of SQL calls inside the code.  What are some of the obvious and not so obvious things that need to be considered and altered when going from a 16 bit VB app to a 32 bit app.  I have done some research and it looks like there are some dll files that would affect some any API calls.  What else should I be looking for?
0
Comment
Question by:ernst8498
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 

Author Comment

by:ernst8498
ID: 1527897
Where do can I get the information and documentation on deploying a project such as this?  Are any checklists available or outlines?
0
 
LVL 3

Accepted Solution

by:
HATCHET earned 800 total points
ID: 1527898
ernst8498,

The biggest thing is to look the API calls you've got from the 16bit code and make sure you replace them all with the equivelant 32bit versions.  Refer to the API reference utility that comes with Visual Basic in the directory you installed Visual Basic in a sub-directory called "WinAPI".  Run the program "APILOAD.EXE" in that directory and look up the API declares, constants, and types to make sure they're all 32bit.  If you don't have this utility, I can send you a copy of it.

---------

One thing that doesn't effect your code due to backwards compatability but is annoying is all the 16bit declarations.  Here's some examples of what I mean :

16bit :
=====

Dim MyInt%
Dim MyString$
Chr$(13)
Command$

32bit :
=====

Dim MyInt As Integer
Dim MyString As String
Chr(13)
Command

---------

Also, in 16bit code, you'll find a lot of times where when the programmer is calling a function and doesn't need the return value, they'll use "Call" before the function name.  In 32bit, you really don't need this, but again... it still works for backwards compatability.  Here's an example of what I mean - notice when using "Call" that parentases ( ) are required... when you don't use "Call", they're not :

16bit :
=====

Call MsgBox("Hello!")

32bit :
=====

MsgBox "Hello!"

---------

There are a few more things, but these are the biggest.  Lemme know how things go.  Hope this helps.     =]

HATCHET
0
 

Author Comment

by:ernst8498
ID: 1527899
This is a good answer for some of the obvious issues.  I do appreciate this answer as it is valid.  I was really looking for some more of the not so obvious issues, if there are any to know.  

Many Thanks..

John
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 3

Expert Comment

by:HATCHET
ID: 1527900
ernst8498,

Because VB is backwards compatable, you'll have no problems recompiling and running the program once you load it into VB 5 / 6 and checked the API declarations to make sure they're calling the 32bit version of the Windows files.  The interface is obviously different for 16bit and 32bit, but that's also an easy fix with some interface work.  Beyond this... there's nothing really.

Are you running into problems, or errors?   That's another issue if you are.  If not, use my suggestion above and re-do the interface and you'll be set.     =]

HATCHET
0
 

Author Comment

by:ernst8498
ID: 1527901
Thank you very much Hachet.  I will begin this work in about a week and if I run into other problems I'll post them.

Many Thanks

John
0
 
LVL 3

Expert Comment

by:HATCHET
ID: 1527902
Sounds kewl.   =]     Good luck.     TRUST ME... been there, done there.  I've cleaned up program, after program, AFTER PROGRAM that a co-worker who started on Visual Basic 1.0 for MS-DOS wrote.  On top of all the stuff I mentioned above... try totally re-aligning all the code so that instead of :


For a = 0 to CHECKTHIS
If a > i Then
                For b = 0 to SECOND
  Call Testit(ABC)
Next b
    End If
                Next a


... it looks like this :


  For a = 0 to CHECKTHIS
      If a > i Then
        For b = 0 to SECOND
          Call Testit(ABC)
        Next b
      End If
  Next a
0
 

Author Comment

by:ernst8498
ID: 1527903
Thanks again.  I agree with you.  I would certainly have done that and I don't mind hearing good advice.

John
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

688 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