WMI Mystery
- From: "Ron M. Newman" <ronmnewman@xxxxxxxxxxxxxx>
- Date: Tue, 26 Jun 2007 17:09:33 -0400
Have an intereting problem. I have a remote server somewhere, not even on my
network. Accessing it through WMI Explorer works just fine with a user id +
password. I can connect and execute queries correctly.
I have my own c++ code to connect to WMI servers and run queries. It works
locally perfectly however when I use the same code for this remote server
with the user id + password, it connects successfully, but executing queries
gives me the good old "access denied":
Connected to ROOT\CIMV2 WMI namespace <- connection works nicely.
Query for operating system name failed. Error code = 0x80070005 <- query
fails! same query works fine using WMI explorer.
My question i guess is whether I'm doing something wrong with the
CoSetProxyBlanket. My implementation is:
hres = CoSetProxyBlanket(
pSvc, // Indicates the proxy to set
RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx
RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx
NULL, // Server principal name
RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx
RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx
NULL, // client identity
EOAC_NONE // proxy capabilities
);
any help would be appreciated.
Ron
.
- Follow-Ups:
- Re: WMI Mystery
- From: Gerry Hickman
- Re: WMI Mystery
- Prev by Date: Re: Future of the MSI provider?
- Next by Date: Re: Future of the MSI provider?
- Previous by thread: NullReferenceException in ManagementObjectSearcher c'tor
- Next by thread: Re: WMI Mystery
- Index(es):
Relevant Pages
|