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.

LVL 28
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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!
sybeAuthor Commented:
I did, I know how to register a dll.

The problem is the error message. I found where it says that the error can occur while registering a win16 dll. I don't know if msado15.dll is a win16 dll.

sybe, win16 dll refers to a 16-bit file.  Did you run the system file checker?
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

sybeAuthor Commented:
Yes, I did run SFC, and it did not help
See if this article helps ->

Quote:   When you try to register a dll manually, make sure the path is in double quotes, otherwise spaces in the path mess things up ... Unquote:

regsvr32 "C:\Program Files\Common files\System\ADO\msado15.dll"
sybeAuthor Commented:
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.

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.

I have had a chance to look at my Windows 98 and Windows 98SE CD's.
From what you have stated about "installing a NEW mdac" and the version number of your "msado15.dll", I believe I can see what you are doing.

In the sub-folder of the Windows 98 FIRST Edition CD named "pws" - The setup files used for "Personal Web Server" (CD:\add-ons\pws) I see the setup.exe file that is intended to install (amongst other things) "Microsoft ActiveX Data Objects 1.5".  The file "AdorInts.htm" provides details about it, and the component files are stored in "" within that same directory.  MSADO15.DLL version 1.50.2603 is stored in that cab file, and it is the same version that is contained in the WIN98_33.CAB stored on the CD in the "win98" folder and would be extracted using SFC if you chose to extract a single file from the CD.  I see immediately that the version of regsvr32.exe in the pws folder (4.00.1381) is a lesser version than the one installed by Win98 1st Edition (5.00.1586.1).  I don't think this has any significance.

From the questions listed against your username here, and from the readme htm file quoted above, I see that your main interest is "Active Server Pages" and obviously this is why you have the need to install MSDAC.

>>> "To use ADO you will need a programming environment which supports Automation objects. Currently this includes (but is not limited to) products such as Microsoft Internet Information Server 3.0 or 4.0 (with Active Server Pages), Microsoft Personal Web Server 4.0 for Windows 98, the products in Microsoft Office, and Microsoft Visual Studio". <<<

Unfortunately, this is where it loses me a bit, because this is an area that I am not very conversant with.  I am good at break-fix resolutions and overcoming most DLL incompatibilities, etc, but IIS etc are an area that I have had little exposure to.  I never have need to install Personal Web Server, etc.  I always do a custom installation and don't install any of these.  All I can comment on from this point onwards are generalities concerning installation processes and potential problem areas with that.

The first thing I would say is that the MS Data Access Components on the Win98 First Edition CD are pretty old at version 1.5 so I checked to see what versions may be available for Windows 98, and found version 2.8:

Supported Operating Systems:
Windows NT, 98, ME, 2000, XP

Brief Description
Microsoft Data Access Components (MDAC) 2.8 contains core Data Access components such as the Microsoft SQL Server OLE DB provider and ODBC driver.

Microsoft Data Access Components (MDAC) 2.8 contains core Data Access components such as the Microsoft SQL Server OLE DB provider and ODBC driver. This redistributable installer for the MDAC 2.8 release installs the same Data Access components as Microsoft Windows Server 2003 <---- *** !!
This release does not include Microsoft Jet, the Microsoft Jet OLE DB Provider or ODBC driver, the Desktop Database ODBC Drivers, or the Visual FoxPro ODBC Driver.

Jet 4.0 Service Pack 8 (SP8) for Windows 95/98/NT 4.0 is available here:

You'll see the link on that page for version 2.8 SP1 of MDAC, and it quotes that:
"This redistributable installer for the MDAC 2.8 SP1 release installs the same Data Access components as Microsoft Windows XP SP2".

I'm not sure how compatible this would be, and it would obviously be important to read the release notes.  For instance, I see notes that say "Don't install MDAC 2.6 or later on SQL Server 7.0 or 6.5 clustered installations; doing so will break your cluster".

The different versions of MDAC installed by the various Windows OS's and MS Office Applications are shown in the table here:

>>> "MDAC 1.5 08/01/1997 - shipped two separate releases, with two separate sets of files. Shipped in betas for Internet Information Server (IIS) 4.0 (Windows NT 4.0 Option Pack), Internet Explorer 4.0, Internet Explorer 4.01 SP1, and Windows 98. The first release was in Internet Explorer 4.0. The second was from the 1997 Professional Developer's Conference" <<< 

I see links to the following download page for a utility to check the MDAC components:

>>> "The Component Checker tool is designed to help you determine installed version information and diagnose installation issues with the Microsoft Data Access Components (MDAC)". <<<

Unfortunately the oldest version it can check the components of are MDAC 2.1 SP2.  I also states "This version of the Component Checker has a dependency on MSXML2.dll. Users who do not have this dll on their machine will be prompted to visit to install MSXML 3.0 SP4 on their machines".

I'm going to have to inspect the setup files in the PWS sub-folder of the Win98 CD to see if I can see where any potential problems lie, and will get back to you.  Perhaps you could let us know some of the issues I have brought up above.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day 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.
sybeAuthor Commented:
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+):

Direct Link:

SonicStage Version 3.4 For USA "Connect" Music Store (needs Win98se+ and IE5.5+):

Direct Link:

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:

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;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.
sybeAuthor Commented:
>  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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.