ConnectServer always returns WBEM_E_INVALID_PARAMETER
- From: "Martin Friedrich" <MartinFriedrich@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 8 May 2005 09:30:01 -0700
Hello, all!
When trying to connect to WMI on a remote machine, calling
IWbemLocator::ConnectServer always returns WBEM_E_INVALID_PARAMETER
(0x80041008). For example, in the following code:
// snip
IWbemLocator* locator = NULL;
CoCreateInstance( CLSID_WbemAdministrativeLocator, NULL,
CLSCTX_INPROC_SERVER,
IID_IWbemLocator, reinterpret_cast< void** >( &locator ) );
_bstr_t namespace( L"\\\\myhost\\root\\cimv2" );
_bstr_t user( L"myhost\\user" );
_bstr_t passwd( L"****" );
IWbemServices* service = NULL;
locator->ConnectServer( namespace , user, passwd, NULL,
WBEM_FLAG_CONNECT_USE_MAX_WAIT, NULL,
NULL,
&service );
// snip
WBEM_E_INVALID_PARAMETER is returned by ConnectServer if namespace specifies
a remote machine (both "\\host\namespace" and "//host/namespace" notations).
wbemtest.exe can connect to the remote machine without problems. This
happens with Win XPSP2 and 2003 Server as local machines and Win XPSP2 as the
remote one. Any clues on that?
Hint: Around Feb 23, 2004 one Frank Natoli asked about a problem with the
same symptoms in a thread named "ConnectServer Problem", which didn't provide
a solution. I'd like to contact him on that issue, but he posted via an
anonymous account. So, if he read this...
Anyway, any help would be appreciated.
Bye,
Martin Friedrich
.
- Follow-Ups:
- Re: ConnectServer always returns WBEM_E_INVALID_PARAMETER
- From: alexbalaev
- Re: ConnectServer always returns WBEM_E_INVALID_PARAMETER
- Prev by Date: Re: USB
- Next by Date: Re: WMI Logoff won't
- Previous by thread: USB
- Next by thread: Re: ConnectServer always returns WBEM_E_INVALID_PARAMETER
- Index(es):
Relevant Pages
|