Link to home
Start Free TrialLog in
Avatar of sybe
sybe

asked on

Error with registering a dll

On Windows98SE I am having trouble with the MDAC installation. Somehow something went wrong, and I can not seem to repair it. When installing a new MDAC, the installer says that several dll's did not register. One of them is msado15.dll

I tried registering manually with

C:\Program Files\Common Files\System\Ado\regsvr32 msado.dll

and it gave a strange error: LoadLibrary("msado15.dll") failed - A device attached to the system is not functioning

Now I am very curious as to which "device" this should refer. And also why any device should be involved in registering a dll.

I'd like to be helped a lot, because some programs don't functions because of this MDAC error.


Avatar of war1
war1
Flag of United States of America image

Greetings, sybe !

Go to Start > Run and type regsvr32 msado.dll

Do the same for the other files.

You may want to run the System File Checker to make sure the system files are not corrupted. Go to Start > Run and type SFC

Best wishes!
Avatar of sybe
sybe

ASKER

I did, I know how to register a dll.

The problem is the error message. I found http://support.microsoft.com/kb/q249873/ where it says that the error can occur while registering a win16 dll. I don't know if msado15.dll is a win16 dll.


SOLUTION
Avatar of war1
war1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sybe

ASKER

Yes, I did run SFC, and it did not help
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sybe

ASKER

I am doing this:

C:\Program Files\Common Files\System\ADO>c:\win98\system\regsvr32 msado.dll

I understand that a path with spaces in it should be in quotes, but there is no space in the path that I type in the command line


It's not only this dll, and it is problably not even related to this dll. The problem seems to be more in the depencies of regsvr32. Somewhere something is going wrong badly, although it only shows on some programs.

From your command line, I see that you have Windows installed to "C:\Win98" rather than to the default "C:\Windows" folder.
Try actually changing directory INTO the "c:\win98\system" folder and then running the command as shown in Jonvee's comment above.

C:\Program Files\Common Files\System\ADO> cd \
C:\> cd win98
C:\WIN98> cd system
C:\WIN98\SYSTEM> regsvr32 "C:\Program Files\Common files\System\ADO\msado15.dll"

That eliminates all the potential path errors, but if the dll IS a 16-bit one, then that's clearly the reason for the error.
I have just extracted a copy of msado15.dll version 2.10.3711.9 from my Windows 98se CD (WIN98_33.CAB) to examine it.  From what I can see, this is NOT a 16-bit file and I can see that the file header information states "This program cannot be run in DOS mode".  This file version also contains the two functions that regsvr32.exe will look for when used to register or unregister it (DllRegisterServer and DllUnregisterServer).

In my opinion, these facts mean that the error isn't being caused by the usual reasons for that specific error, ie. trying to register a 16-bit dll with the 32-bit regsvr32 program, but most likely one of the following:

1. Corrupt version of the dll where the DllRegisterServer isn't being found
2. Older version of the dll that IS a 16-bit one
3. One or more of Regsvr32.exe's dependent files is missing, damaged, or an incorrect version.
4. Something to do with the paths you are working from and to at the command line.

You have queried the error message (which you have referred to as "this MDAC error") by asking "I am very curious as to which 'device' this should refer. And also why any device should be involved in registering a dll".

What you have to remember is that "devices" can be hardware or software, and in this context can simply mean that an associated or dependent file isn't being found or isn't working as intended.  The error is a regsvr32.exe error, and not one that is unique to Microsoft Data Access Components.  The actual error is generated by the string in regsvr32.exe namely:
"LoadLibrary(\"%1\") failed.\nGetLastError returns %2."
In other words, it is calling the function "GetLastError" and retrieving the return value from a variable.

This is explained in the Microsoft KB article 249873 that you quoted, and you will see that there are two possibles mentioned:

LoadLibrary("Dllname") failed. GetLastError returns 0x00000002
0x00000002 = 2 (ERROR_FILE_NOT_FOUND), which means "The system cannot find the file specified." In other words, a dependent DLL was not found.

LoadLibrary("dskmaint.dll") failed. GetLastError returns 0x000001f
0x000001f = 31 (ERROR_GEN_FAILURE), which means "A device attached to the system is not functioning." This behavior can occur if you try to register a Win16 .dll file.

From what I can determine:
1. The "GetLastError" function is called from KERNEL32.DLL
2. The error dialog is generated from the functions "LoadStringA" and "MessageBoxA" in USER32.DLL
3. GDI32.DLL is used to translate things
4. ADVAPI32.DLL would be used to open the registry and actually create or remove (register or unregister) settings
5. OLE32.DLL would be used to initialize or uninitialize (load or unload) the dll (I think?)

(Note: I'm NOT a programmer, and nor am I an expert in Windows API's, so the above is only from what I can determine using my restricted knowledge).

So, looking through what I perceive to be the uses of those dependent dll's, I would say that you MAY have a problem with one or other dll IF regsvr32.exe is failing while trying to register other dll's.  Perhaps mismatching versions, where the resources and/or functions within another dll aren't where they should be.  Something like that, or perhaps a corrupted file.  Check the version numbers of these related dll's to start off with.  That was why war1 suggested running SFC.

You did say that you had run SFC but that "it did not help".  What you didn't say was whether SFC actually restored ANY files at all.  Check your logfile and see if it mentions any of these files. C:\Windows\SFCLog.txt, or in your case "C:\Win98\SFCLog.txt".  Be aware that if you have previously run SFC and told it to update its version database when it encountered a system file that differed from the original version originally installed by Windows 98, then it isn't going to stop and report this file UNLESS it is found to be corrupted.

There are a lot of different programs and applications that MAY have replaced OLE32.DLL with an older or newer and incompatible version.  The original version from a Win98se CD is 4.71.2900 and from a Win98 1st Editiion CD is 4.71.1719.  Windows 98Se and the 1st Edition both install version 4.80.1675 of Advapi32.dll.  All the other DLL's I mentioned above as being interdependent with regsvr32.exe should be the same version as your Win98 version (ie. 4.10.2222 or 4.10.1998).

Note.  I'm sure there would have been a completely different error message from regsvr32.exe if ole32.dll had been corrupt and unable to do its job when called during the registering or unregistering process, eg. "OleInitialize failed" or "OleUninitialize failed".

The absence of another two common regsvr32.exe error messages tends to indicate that your msado.dll file is not corrupt, but that would only refer to a situation where the "entry point" to the dll couldn't be located ie:

"%1 was loaded, but the %2 entry point was not found.\n\n%1 does not appear to be a .DLL or .OCX file".

"%1 was loaded, but the %2 entry point was not found.\n\n%2 may not be exported, or a corrupt version of %1 may be in memory. Consider using PView to detect and remove it".

An entry point is the memory address inside the DLL that contains the Call being made.  The call made from the regsvr32 command without any parameters apart from the name of the dll to be registered is usually "DllRegisterServer", and an inability to locate that entry point at the memory address required would have caused one of the errors above.  Incompatible dll file versions are the most common cause of that, so it would SEEM that this isn't where YOUR problem lies.

A couple of things that I have to ask are with reference to your statement:
"When installing a new MDAC, the installer says that several dll's did not register. One of them is msado15.dll".

1. What were the other dll's that failed to register, and were the errors exactly the same?
2. When you say "installing a NEW mdac", is this an update package or some other download?

Packages often come with a copy of regsvr32.exe contained amongst the setup files.  Are you absolutely sure that the "new MDAC" you are trying to install is compatible with Windows 98?

I know these comments and overviews don't immediately solve your problem, but perhaps if you could comment on them and clear up my queries above it might provide a clearer picture of the situation.

Bill
Actually, just looking back over this situation, it COULD be caused by the fact that the DLL's that are failing to register are already loaded into memory.  One quick way to check this:

1. Start Menu > Run > and type MSINFO32 > click OK
2. Software Environment > 32-bit modules loaded
3. Edit > Select All > Edit > Copy
4. Paste into Wordpad or Word (scroll back to top)
5. Scroll over and copy (Ctrl + C) one of the tab spaces
6. Edit Menu > Replace
7. Paste your tab space (Ctrl +V) into "Find What", and type a comma into the "Replace With" field.
8. Replace All.
9. Save As "Text Document - MS-DOS Format" or "Text Document" and name as Modules.CSV.
10. Close Wordpad and double click your new CSV file to open in Microsoft Excel.  Delete any columns not required.

That gives you a legible and printable listing to work through while comparing it against those DLL's that failed to register, and a quick way to view the file versions as well.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
My last comment vanished.  I had said that I had somehow got the idea of Windows 98 1st Edition into my head, and that I would have to check my Win98se CD to verify file versions etc previously quoted.
Avatar of sybe

ASKER

MDAC is also used by some desktop programs. One of these is SonicStage, a program that connects the PC with a minidisk-player.

I ended up reinstalling Windows. I did not trust my installation anymore. Something was wrong, and it was quite deep in the installation. I could not find any virus or something, but I was having suspicion about something. A rootkit maybe. It could also have been because I installed some software that was not doing the right thing. I did install a pirated program, maybe it had a payload, or maybe something else.....

I first tried reinstalling it over the current installation, but also that caused some errors, so I decided it was best to do a clean reinstall.

Maybe there were other ways to solve it, I thank you all for your information. I had checked a lot of pages and downloads on the Microsoft pages, tried different tools and updates but nothing worked. Of course reinstalling the drivers can be a pain. Find the right CD's, check if there are any updates available etc. But I got most things running again now.

Thanks again for your efforts. I'll divide the points according to effort.

Thank you, sybe.
It does sound as though there was something far deeper going on there that was causing the problem.

Just out of interest (I always see if I can dissect programs to see what they install), here are some current links for the "Sony Connect" program (SonicStage):

SonicStage Version 3.4 For European "Connect" Music Store (needs Win98se+ and IE5.5+):
http://support.sony-europe.com/DNA/sonicstage/sstage_dl.asp?l=en#disc

Direct Link:
http://www.aii.co.jp/contents/sonic/_data/ss34_01_13062/AE/SonicStageInstaller.exe

SonicStage Version 3.4 For USA "Connect" Music Store (needs Win98se+ and IE5.5+):
http://www.connect.com/download_cookie.html

Direct Link:
http://sonicstage.connect.com/SonicStageInstaller.exe

NOTE: The above two "installers" are only download initialisers that fetch the required files from a server as temp files and then install from the temporary cache, so you have to be online before double-clicking "SonicStageInstaller.exe".  You MIGHT be able to pause the process, before clicking the final button, and copy out the temporary files to another folder to use as a full installer package later.

Alternative Program (MP3 File Manager) For Network Walkman Devices:
http://www.syndetics.net/sony-hacks/sonicstage.html

Regarding the Microsoft Data Access Components.  I wondered if the Windows Update Hotfix Q329414 might have contributed to this if it had been installed:
MS02-065: Buffer overrun in Microsoft Data Access Components can lead to code execution
http://support.microsoft.com/default.aspx?scid=kb;en-us;329414
BUT, when you look at the files that it installs/updates, they are all from MDAC version 2.1 onwards.

I had a look at the version of MDAC that Win98se installs, and it is just the same old and outdated version 1.5 as installed by Win98 1st Edition, and it dates back to 1997.
If you install MS Office 2000 or Internet Explorer 6.0, then they will install MDAC version 2.1.  Office 2000 installs IE 5.1, but it's strange that IE 6.0 only installs the same version of the MDAC components.

If you have the full package of setup files for IE6.0, then you could unzip MDAC_IE5.CAB to its own folder and have the setup files for MDAC 2.1.  You will find the same cab file in the CD:\IE5\EN folder of the Office 2000 CD.

Incidentally, neither of these MDAC setup packages directly call regsvr32.exe to register the DLL's.  Registry settings and file copying are done from scripted instructions in *.INF files that the setup program follows, and the system reboot takes care of the rest.

Anyhow, I'm glad that you have the problem sorted out now, albeit a bit of a painful and time-consuming resolution.
Avatar of sybe

ASKER

>  Registry settings and file copying are done from scripted instructions in *.INF files that the setup program follows, and the system reboot takes care of the rest.

Yes, I know it does. The installer gave error messages that some of the dll's could not be registered. That is why I tried to use regsvr32 to do a manual register and I was very surprised when I saw the error message. Initially I thought the error must be in the dll, but as I see it now, the error was caused by something in the chain that was called by regsvr32, because every dll I tried to register with regsvr32 gave the same error.

I don't know why the installer was able to register most of the MDAC dll's, but could not register some (there were three dll's of the MDAC package that gave an error registering through the installer).

As I said, all those unpredictable errors made me suspicious that something somewhere in the Windows installation was corrupted. I still think that it was a wise decision to do a clean reinstall, even though I'll probably be reinstalling programs now and then in the coming weeks.

As for the SonicStage download. I have managed to download the latest version already, although it wasn't made easy by Sony. First of all they require that one uses IE just to download something (sic), and secondly the link to the downloadpage was hidden in a corner of a big page that was full of all kinds of music downloads. As I am completely not interested in downloading music from Sony, it's quite annoying. I bought the minidisk to have a handy device for recording stuff with a microphone and have it digitized right away.

Well, if one knows the direct links to downloads, of course it is easier, but one has to find those links first, and that was a pain.



sybe .. thank you.