Microsoft KB Archive/231841

= PRB: Invalid Page Fault Using DAO After Installing DAO Redist from Visual Studio =

Article ID: 231841

Article Last Modified on 11/17/2003

-

APPLIES TO


 * Microsoft Visual Studio 6.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q231841



SYMPTOMS
On a Windows 95 machine, MFC DAO applications may generate an Invalid Page Fault after installing the DAO Redist provided with Visual Studio CDs.

The following error message is expected:

[Program Name] has caused an invalid page fault in module [unknown] at 0000:00000009



CAUSE
The problem occurs only on computers with older copies of Oleaut32.dll, prior to version 2.30.4261.1.

NOTE: Windows 95, Windows 95 OSR2, and Microsoft Office 97 are among some of the products that shipped older versions of Oleaut32.dll.

It is important to note that installing the DAO Redist from Visual Studio can generate this behavior in MFC DAO applications that worked correctly prior to installing the DAO Redist, which can occur if you had an older version of DAO (Dao350.dll) and the DAO Redist replaces this with a newer version of DAO. In this case, the newer version of DAO is using Expsrv.dll rather than Vbar332.dll (Expsrv.dll was not designed to be used with these older versions of Oleaut32.dll). For example, if you install Microsoft Access 97, which installs Dao350.dll version 3.51.1027.0, your MFC DAO application will run correctly until installing the DAO Redist, which replaces Dao350.dll with version 3.51.1608.0, and therefore uses Expsrv.dll, which is incompatible with the older version of Oleaut32.dll.



RESOLUTION
To resolve this issue on computers already experiencing this problem, you must replace the older version of Oleaut32.dll with version 2.30.4261.1. This version is distributed with many Microsoft products. The easiest way to accomplish this is to install DCOM98, which is available on Disk 1 of Visual Studio 6.0. DCOM98 properly installs and registers version 2.30.4261.1 of Oleaut32.dll. You can also install MDAC 2.0 and later from the Microsoft Universal Data Access Web site:

http://msdn.microsoft.com/dataaccess

To prevent this behavior from occurring in future redistributions of MFC DAO applications, it is recommended to include Oleaut32.dll version 2.30.4261.1 in your own DAO Redist setup program rather than using the DAO Redist provided by Visual Studio 6.0.

For additional information about creating a DAO redistribution application, please see the following article in the Microsoft Knowledge Base:

167523 HOWTO: Redistributing DAO with Your Visual C++ 5.0 Application



Steps to Reproduce Behavior on Windows 95 Machine

 * 1) Redistribute/copy Mfc42.dll and Msvcrt.dll into your system folder, if they don't already exist.
 * 2) Install DAO Redist by running \DAOSDK\Redist\Disk1\Setup.exe. DAORedist can be found on the Visual Studio CDs.
 * 3) Run the sample Daoview.exe, which can be found in the MSDN.

NOTE: You should build this sample on a separate computer because installing Visual Studio 6.0 installs the correct version of Oleaut32.dll, thus preventing the reproduction of this behavior.

RESULTS: You will receive the Invalid Page Fault error specified above.

