Advertisement

03.25.2008 at 04:49AM PDT, ID: 23266605
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Visual Basic 6.0: Run-time error '372': While main form is loaded.
Tags: Visual Basic 6.0, Run-time error '372': Failed to load control '' from .  Your version of  may be outdated.  Make sure you are using the version of the control that was provided with your application.
Dear Expert,
Recently I have started working on an existing application which was developed using Visual Basic 6.0. I made some changes in the application, built a setup and deployed on a machine where VB6 is not installed. When I am running this application, I am getting following error message

"Run-time error '372':
Failed to load control '' from .  Your version of  may be outdated.  Make sure you are using the version of the control that was provided with your application."

Please note that this message is niether giving me the name of control nor the name of dll/ocx.
My application is using some OCX files and I have included all the OCX files in setup. I have also include all the dependencies captured by "InstallShield 12" (The packaging tool I am using).

My application flow is as below
1. I start with a Splash screen that load/Unload successfully.
2. In Unload of Splash screen I call a method as follow
Private Sub Form_Unload(Cancel As Integer)
    'MsgBox ("Unloading splash")
    SubMain.Main
End Sub
3. Inside SubMain.Main I do following
Sub Main()
     DBOpen 'Success
     MainRecordSet 'Success
     CountRecordSet 'Success
      .........................
      ..........................
     frmMain.Timer_GetStatus.Enabled = True 'Failed     <==== At this place I get the error.
      .........................
      ..........................
End Sub
The statement
frmMain.Timer_GetStatus.Enabled = True
Results a call to Form_Load() method of frmMain.
On development machine the above code work absolutely fine. But when I install the application on new machine (where VB6 and other things are not installed), the application gives runtime error as said above.

As I am new to VB6, Can anyone help me ?

Thanks in advance.
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: GautamSYadav
Solution Provided By: peetm
Participating Experts: 1
Solution Grade: A
Views: 35
Translate:
Loading Advertisement...
03.25.2008 at 05:12AM PDT, ID: 21201079

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.26.2008 at 05:42AM PDT, ID: 21210931

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.26.2008 at 10:32AM PDT, ID: 21214172

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.27.2008 at 02:11AM PDT, ID: 21219581

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.27.2008 at 04:24AM PDT, ID: 21220184

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.27.2008 at 09:28PM PDT, ID: 21228025

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.28.2008 at 02:56AM PDT, ID: 21229015

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.29.2008 at 04:10AM PDT, ID: 21236140

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.29.2008 at 04:57AM PDT, ID: 21236218

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
03.25.2008 at 05:12AM PDT, ID: 21201079
Get depends.exe [http://www.dependencywalker.com/] take it to the machine with the exe installed, and run the exe under depends.exe's Profile option.  That should show you what's up.
 
03.26.2008 at 05:42AM PDT, ID: 21210931
Thanks for reply.
I ran this tool and found no help. I rebuild the setup and tried to reinstall on the same machine. Now I am getting another run time error.

'48 'Runtime error has occurred in:
There was an error to load a DLL.

When I profile the application with dependency walker, it does not show any failure message for any specific dll. I compared the results of profiling the same application on both the machine (working and non working machine). Though I found some differences but unable to conclude. Can you please look into attached files and conclude which dll the application is unalbe to load that causes the run time eorr 48.

Thanks again.
 
Result of dependency walker on the machine where apllication give run time error
 
 
Result of dependency walker on the machine where application runs successfully
 
 
03.26.2008 at 10:32AM PDT, ID: 21214172
Ok, well it sounds like something's *still* missing ;-)

Ok, well try this instead - as it might show up something.

    http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx

Set the Filter to include only your exe - otherwise you'll be drowned in data.

You might also want to look at [in no special order] : Details here:    http://technet.microsoft.com/en-us/sysinternals/cb56073f-62a3-4ed8-9dd6-40c84cb9e2f5.aspx


    http://technet.microsoft.com/en-us/sysinternals/bb896656.aspx

and

    http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx

and

    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

and

    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx


You should be able to track it down using one/all of these!


P.S. Can you please re-save/convert any files you want me to look at into .txt files.

 
03.27.2008 at 02:11AM PDT, ID: 21219581
Thanks for your prompt reply.
The problem is partially fixed. On English version of WinXP the setup and application is running fine.
But on Korean version of WinXP, I am still getting the error,
"'48 'Runtime error has occurred in: There was an error to load a DLL. "

There is one thing that I forgot to tell you last time is: I am getting one error during  installation, The error is "Error 1931. The windows installer service can not update the system file C:\Windows\System32\comdlg32.dll because the file is protected by windows.........."
I am ignoring this error and setup is completed successfully.  But when run the application, I get runtime error 48 as said above.

I compared the versions of comdlg32.dll on both OSs (Korean & English) and it is absolutely same.
I am creating the setup on English OS.  Is the problem because of this ??

I tried one thing more that partially worked. I included the Korean version of comdlg32.dll in setup. And when I installed this setup on Korean OS, I still get the error "Error 1931...." during installation but setup continues successfully. And after that application also works fine on both Korean and English OSs.

But I feel this not the correct solution to the problem.

Could you please guide me on this ??

Thanks !

 
03.27.2008 at 04:24AM PDT, ID: 21220184
>>"'48 'Runtime error has occurred in: There was an error to load a DLL. "

Presumably this isn't the exact text of the error?

>>I tried one thing more that partially worked. I included the Korean version of comdlg32.dll in setup. And when I installed this setup on Korean OS, I still get the error "Error 1931...." during installation but setup continues successfully. And after that application also works fine on both Korean and English OSs.

Well, if the dll on the system remains intact, I can't see why this should change anything at all.

Did you use any of the tools I pointed out to 'watch' the program run - and determine exactly which dll is the problem?
 
03.27.2008 at 09:28PM PDT, ID: 21228025
>> Presumably this isn't the exact text of the error?
This is the exact text of the error. the message does not show the name of dll.

>>Did you use any of the tools I pointed out to 'watch' the program run - and determine exactly which dll is the problem?
No. could you please see the result of dependency walker attached.
 
Result of dependency walker on machine where run time error
 
 
Result of dependency walker on machine where app runs properly
 
 
03.28.2008 at 02:56AM PDT, ID: 21229015
Can you check
 
   - that both machines have these installed, and registered
   - the versions
   - the locations of each

imm32.dll
ssubtmr6.dll
mscomctl.dll
vbalcmdbar.ocx

Then, if you don't find some incompatibility that fixes the problem [has Windows Update been run on the 'bad' machine btw?]

Run the app on the good machine, and then run these [sent you the links earlier], and capture the output.

handle -p <appname>
listdlls -r <appname>

Then run again on the bad machine, and before closing it down, i.e., leave the error message displayed, run those again.  Then post the outputs of all output as text files back here please.
 
03.29.2008 at 04:10AM PDT, ID: 21236140
Thanks !
My problem is fixed for now.
I found great help from you and will close this question by accepting you comments. :)

but I still have some doubts. Please comment on these. It will be great value addtion to my knowledge.

1. Why same process (My application) having some extra dlls loaded on different machine(s) ??
On my pc (the dev. machine) the process having loaded following dlls

Apphelp.dll
MFC42.dll
MFC42LOC.dll
mslbui.dll.        
But on testing machine application is working now, machine has these dlls but still not loadded in memory when application is running, Why ?

2. Through "Process Explorer" [the tool that you specified above] I was able to find out that a dll named "msstdfmt.dll" is loadded on good pc but was not present on bad pc. How can I make sure that what dlls are required by my application ?? InstallShield 12 (The latest version) never asked me to include this dll or related merge module in setup.

3. What is the best practice to create such installation packages.

Thanks again.

 
03.29.2008 at 04:57AM PDT, ID: 21236218
Firstly, to 'setups'.

I believe that InstallShield has an option to run and monitor an application - for which you want to build a setup - so that it can determine what dlls etc are required.

dlls, use other dlls, which use other dlls etc, and it's not always just those dlls and controls etc that you've referenced in your project - that's why having InstallShield 'watch' your program run is useful - if you like, think that InstallShield is using some sort of internal Process Explorer to determine what's required.

So, on setups - check out whether or not InstallShield provides this functionality.  If it doesn't - well, Process Explorer is your friend!

>>But on testing machine application is working now, machine has these dlls but still not loaded in memory when application is running, Why ?

Do you have a list of what each process uses - for example, is there a different version of MFC??.DLL loaded on the 'bad' machine.  What versions of the common components are loaded - if they differ, one of these maybe bringing in a dll like AppHelp.  Are the OS versions exactly the same, and do they all have the latest patches - does one have IE7 installed etc.  All of these things may be the cause of the differences you see.
Accepted Solution
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628