CComPtr<IWbemLocator> spLoc;
hr = spLoc.CoCreateInstance(CLSID_WbemLocator);
//no error here
// Connect to CIM
CComPtr<IWbemServices> spServer;
hr = spLoc->ConnectServer(bsNamespace, bsUserName, bsUserPasswd, 0,
NULL, 0, 0, &spServer);
//no error here
hr = CoSetProxyBlanket(spServer, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE,
NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL,
EOAC_NONE);
//no error here
hr = (*pServer)->GetObject(CComBSTR(L"VZServerInfo"), 0, NULL,
&m_spVZServerInfoClass, NULL);
//here is hr == 0x80070005: Access is denied.
once again:
1) No source code was changed
2) I could connect before but not right now to Win2003 server. My own
PC is win2003 server also. I tryed to connect from WinXP to 2003
server, but it was failed with the same error.
3) I can successfully connect using this source code to WinXP server
4) no other errors occurred
5) wbemtest can successfully get VZServerInfo class in the namespace
specified both on WinXP and Win2003 server
6) no error logs are in Windows/System32/Wbem/Logs folder. I've
changed the log level to verbose mode but still had no error logs.
7) user exists, it has administrator access
8) no providers are loaded. The error occurred when trying to access
CIM repository (GetObject with my class name)
9) Google search found no results.
Please, help
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Stanislav Efremov" <he...@sw.ru> wrote in message
news:54b7374a.03121...@posting.google.com...