Cause Of Error '48' (Error in loading DLL) When Running VB6 Application?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I get the Error 48 when running on Computer #1, but <span style="text-decoration:underline
Do Not get the error when running on Computer #2. Both computers are running Windows 7 SP1. Here is a summary of my problem:
1) Trying to run a rather complex VB6 Application (compiled)
2) The identical application software runs without problems on MANY (> 100) other W7 Computers, including my Computer #2.
3) The App fails on Computer #1 (when starting) with the following error message:
Run-Time Error 48
Error in loading DLL


I have identified the <span style="text-decoration:underline first line of code where the error occurs to the line that is
<span style="text-decoration:underline underlined and begins "For Each tdTables" in the code snippet below:



Public Sub ReLinkTables()<br/>
<br/>
Dim tdTables As TableDef, strTemp As String, dbCountyHunter As Database, tdNew As TableDef, I As Integer, lngAttribute As Long
<br/>
Dim strXX As String
<br/>
Dim strMsg As String For Test Message Box String<br/>
<br/>
Following Will Be Common To ALL Standard Error Handling Routines<br/>
Dim blnErrorFixAttempted As Boolean, blnReportToTeam As Boolean<br/>
Const strModuleName = "ReLinkTables" Module Name Will Change For Each Module!
<br/>
Initialize Local Variables For This Routine<br/>
Const lngLinked = 1073741824<br/>
blnReLinkProblem = False<br/>
<br/>
On Error GoTo ErrorHandler
Set dbCountyHunter = OpenDatabase(strDataFolder & "" & KLstrFilePrefix & strCallMine & KLstrFileSuffix, False, False, ";pwd=" & KLstrDBPassword & "")
I = 0<br/>
<br/>
<span style="text-decoration:underline For Each tdTables In dbCountyHunter.TableDefs<br/>
I = I + 1<br/>
strTemp = tdTables.Name<br/>
lngAttribute = tdTables.Attributes
If lngAttribute = lngLinked Then<br/>
dbCountyHunter.TableDefs("" & strTemp & "").Connect = ";DATABASE=" & strDataFolder & "County Hunters - Common.mdb;pwd=" & KLstrDBPassword & ""
<br/>
dbCountyHunter.TableDefs("" & strTemp & "").RefreshLink<br/>
End If<br/>
<br/>
Next<br/>
<br/>
blnRelinkDone = True<br/>

End Sub<br/>

<span style="text-decoration:underline The purpose of this Subroutine is to re-link tables in 2 Access mdb files (if they should happen to not be linked properly).


In an attempt to narrow down which dll file might be causing the problem, I searched ALL dll and ocx files in the SysWOW64 folder for the string "TableDefs" and only found one file. This was file "MSRDO20.DLL" which is one of the dependent files for "MSRDO20.OCX"
in the same folder. Both of these files are present on the problem machine in the correct folder (SysWOW64). I believe both files are registered, but am not totally certain.
Inspired by the Microsoft article at http://support.microsoft.com/kb/833220
http://support.microsoft.com/kb/833220 (that didnt fix Computer #1!) I found that I can reproduce the identical problem on Computer #2 by simply un-registering the file "dao360.dll" (in the C:Program Files (x86)Common Filesmicrosoft sharedDAO folder).
However, going back and immediately re-registering the same file doesnt cure the problem! I have to load a restore point to regain normal operation on Computer #2
I have also tried to cure the problem by re-installing the VB application with the UAC at its lowest level and anti-virus programs inactive. All unsuccessful!
Also, a "Repair Install" of Windows 7 is not an option for Computer #1 since it is an OEM installation of Windows.
I believe I have wandered into a "DLL Hell" situation here!

Please answer the following questions if you can:
1) Do you think I may have located the file (MSRDO20.DLL) which cant load or is it dao360.dll?
2) If either is the culprit, what do you recommend I do to fix the problem?
3) If No, can you give me a better method to determine what the culprit dll file is or a better way to just solve the problem?
4) Is there a utility program which will check that all <span style="text-decoration:underline
Windows 7 SP1 WDAC system files are properly installed (especially those needed to support Visual Basic 6) and are the correct version, in the correct folder, and are correctly registered?
(Incidentally, I have tried SFC and it shows NO errors and doesnt fix the problem)
5) If no such utility exists, can you point me to a resource (File Manifest?) that lists ALL system files (<span style="text-decoration:underline just those needed to support VB 6 operation ) normally installed by Windows 7 along
with correct Version/date and the correct folder in which they should be found?
Many Thanks For Any Help!
Matt

View the full article
 
Back
Top