Microsoft KB Archive/254659

{|
 * width="100%"|

Starting Local COM Server Returns Error Code 0x80080005

 * }

Q254659

-

The information in this article applies to:


 * Microsoft Windows 98 Second Edition
 * Microsoft Distributed Component Object Model (DCOM), version 1.2
 * Microsoft Windows 95
 * Microsoft Windows 98

-

SYMPTOMS
When you start your computer without a network and then dynamically add a network (by inserting a PCMCIA network adapter or by using Dial-Up Networking), the first attempt to start a local COM server is unsuccessful if Distributed Component Object Model (DCOM) is installed.

The underlying error message is detailed in the following table.

CAUSE
When there is no network, DCOM identifies the local computer using RPCSS with the loopback address (127.0.0.1). When you dynamically add a network, remote procedure call (RPC) does not detect the new Internet Protocol (IP) address until it is reinitialized. However, COM initializes first and sends a request to RPC to locate the local server. This does not trigger an RPC reinitialization, and subsequent attempts to start the local server can succeed.

WORKAROUND
To work around this behavior, start the client program a second time.

The following code sample shows how to bypass the problem programmatically:

#include "stdafx.h"

int fIsWin9X(void) {   OSVERSIONINFO info; ZeroMemory(&info, sizeof(OSVERSIONINFO)); info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx( &info ); if ( 4 == info.dwMajorVersion && VER_PLATFORM_WIN32_WINDOWS == info.dwPlatformId ) return TRUE; return FALSE; }

HRESULT myCoCreateInstance(  REFCLSID rclsid,   LPUNKNOWN pUnkOuter,   DWORD dwClsContext,   REFIID riid,   LPVOID * ppv ) {   HRESULT hr = CoCreateInstance( rclsid, pUnkOuter, dwClsContext, riid, ppv ); if ( CO_E_SERVER_EXEC_FAILURE == hr && fIsWin9X ) return CoCreateInstance( rclsid, pUnkOuter, dwClsContext, riid, ppv ); return hr; }

STATUS
Microsoft has confirmed this to be a problem in Windows 95 and Windows 98 with DCOM 1.3 installed.

Additional query words: nic fail failed dun

Keywords : kberrmsg

Issue type : kbprb

Technology : kbAudDeveloper kbWin95search kbWin98search kbWin98SEsearch kbSDKSearch kbDCOM120 kbZNotKeyword3 kbWin98 kbWinSDKSearch kbWin98SE kbDCOMSearch