Microsoft KB Archive/320108

= PRB: Office Automation Fails with an Incompatible RPC Stub Error =

Article ID: 320108

Article Last Modified on 2/1/2007

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Office Professional Edition 2003
 * Microsoft Office XP Developer Edition
 * Microsoft Office Excel 2003
 * Microsoft Office FrontPage 2003
 * Microsoft Office Outlook 2003
 * Microsoft Office PowerPoint 2003
 * Microsoft Office Publisher 2003
 * Microsoft Office Word 2003
 * Microsoft Office Standard Edition 2003
 * Microsoft Office Student and Teacher Edition 2003
 * Microsoft Office Small Business Edition 2003
 * Microsoft Office Basic Edition 2003
 * Microsoft Office Access 2003

-



This article was previously published under Q320108



SYMPTOMS
After you deploy a development solution to a client desktop, the solution fails when it tries to automate a Microsoft Office application or other out-of-process COM server. The error reported is:

Error: 0x80070725 (-2147023067)

Description: Incompatible version of the RPC stub.

This problem does not occur on Microsoft Windows XP-based clients. It only occurs on clients running earlier versions of the Microsoft Windows operating system.



CAUSE
This problem occurs if the Setup program for your solution installs the OLE Automation system files for Windows XP, instead of the redistributable versions that come with Microsoft Visual Studio or the Microsoft Platform SDK. Unlike previous builds of Oleaut32.dll, the version for Windows XP cannot be used with earlier versions of the Windows operating system.

The following table lists the OLE Automation system files that were installed, together with the current version numbers for both Windows XP versions and the Visual Studio redistributable versions:

Note If you have security updates or service packs installed, your build numbers may differ. The important characteristics are that the first three OLE Automation system files have the same build numbers, and that the Windows XP version of Oleaut32.dll starts with 3.50 instead of 2.40.



RESOLUTION
Make sure that in your application setup, you use the redistributable OLE Automation system files that came with Microsoft Visual Studio. If you develop in Microsoft Visual Basic, for example, these files are located in the redistribution directory for the Package and Deployment Wizard (PDW):

[VSInstallLocation]\VB98\Wizards\PDWizard\Redist

If you have not installed Service Pack 6 for Visual Studio, you can download and install the current redistributable versions of the OLE Automation system files. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290887 VBRun60sp6.exe installs Visual Basic 6.0 SP6 run-time files

For computers that have the wrong OLE Automation system files installed, you must do the following to correct the problem:

 Remove the solution that caused the problem, and then obtain a new Setup program from your software vendor that correctly installs the right versions. On another computer running an operating system earlier than Windows XP, download and install the current redistributable versions of the OLE Automation system files from Q290887. If you do not have a separate pre-Windows XP computer on which to install these files, contact Microsoft Product Support Services to obtain copies of these files. To do so, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

 Manually copy the files listed in the table in the &quot;Cause&quot; section of this article from another computer that is running the same version of operating system and has not had the Setup program that originally caused this error installed on it. Copy the files to the System subdirectory in the Windows directory (or the System32 subdirectory for Microsoft Windows NT and Windows 2000). If you are running Windows 2000 with File System Protection enabled, you must also copy these files to the DllCache subdirectory of the System directory. Restart the computer again. Reinstall the solution using the new Setup program that you obtained in Step 1.

Note You must remove the development solution that caused the issue before you manually copy the new OLE Automation system files. If the Setup program for your solution uses a Detect and Repair feature, it is possible that it will reinstall the wrong versions again the next time it is run. Contact the software vendor to obtain the correct Setup program for your operating system.

Keywords: kbautomation kbprb KB320108

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.