Solved

Unexpected error/Invalid Picture

Posted on 1998-06-15
2
411 Views
Last Modified: 2008-02-26
Trying to run an .exe file created in vb4, I got two different kinds of errors: running the setup wizard an "Unexpected error. Quitting" appears, while loading the temporary files. This error apears the same in a 80486/16M machine as in some Pentium/16M machines. In other Pentiums (with Win95 4.00.950a) aplication works fine. Trying to skip the use of the setup wizard, the whole list of librarys (dll, ocx, etc) was copied in some other machines, together with the .exe file. In a machine (80486/16M/Win95 4.00.950B), a banner showed "Invalid Picture", and the file stop running even without loading completely. In the other one (80486/16M/Win95 4.00.950), a the same message as before (Unexpected error, quitting) appeared after clicking the icon of the .exe file. Hope you can help us as soon as you can.
                                                                                                                                   Pire & Pepe
0
Comment
Question by:pire
[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
2 Comments
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 200 total points
ID: 1463354
pire,

This problem occurs because the target machine has version 5.x of Olepro32.dll installed but does not have version 2.20.xxx of Oleaut32.dll installed. This can happen when Visual Basic 4.0 developers install an Office 97 application, Internet Explorer 3.0, or Visual Basic 5.0 on their machine (thus installing Olepro32.dll version 5.x), and then create a distribution using the Visual Basic 4.0 Setup Toolkit. The Visual Basic 4.0 Setup Toolkit includes version 5.x Olepro32.dll in the files it installs.
When an attempt is made to install the Visual Basic 4.0 application on a machine that does not have the version 2.20 Oleaut32.dll, it fails as described above, leaving the updated version of Olepro32.dll on the target machine.
 
Also, any application on the target machine that uses Olepro32.dll will no longer work because Olepro32.dll attempts to forward calls into the new Oleaut32.dll, which is not present.

RESOLUTION
==========
The Visual Basic 4.0 Setup Toolkit cannot be used to install the updated Oleaut32.dll on the target system because doing so requires the system to be restarted and the Visual Basic 4.0 Setup Toolkit does not have this capability.
 
To correct problems on target machines where installation was attempted, there are two options:

1. Install an application that includes the new Oleaut32.dll onto the problem machines by installing any of the following apps: Internet Explorer 3.0 or Visual Basic 5.0 CC edition (downloadable from the Web), Office 97, Visual Basic 5.0, Windows NT 4.0, or Windows NT 3.51 Service Pack 5.
 
2. Get the original Olepro32.dll from the Visual Basic 4.0 operating system CD-ROM and replace the 5.x version of Olepro32.dll with it. Machines that are not having problems do not need to delete any files.
 
You now need to recreate your installation so the problem will not re-occur. Do this by copying the following components from the \vb\system directory of your Visual Basic 4.0 CD-ROM:
 
   OLEPRO32.DLL
   MFC40.DLL
   MSVCRT40.DLL
 
to the following folder:
 
   C:\Program Files\Microsoft Visual Basic\Setupkit\Kitfil32\sys32
 
Now recreate your distribution. Microsoft Visual Basic 4.0's Setup Wizard always looks first at the above folder when searching for dependent files. When you install your application, only less-recent files on the target machine will be overwritten.


Best regards
Bin Huwairib
0
 

Author Comment

by:pire
ID: 1463355
We didn´t needed to install any whole program, (like IExplorer 3.0), we just copied the correct version Dll's from another machine and the application ran fine. Thanks
0

Featured Post

Industry Leaders: 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!

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

726 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