Sign in to follow this  

Help getting WMI data function working

This topic is 3737 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! I'm trying to get WMI data but can't get a function to work...
CoSetProxyBlanket()
What's happening is that I can't get my compiler to recognize this function. I've added 'ole32.lib' to the dependencies list and included 'objbase.h' per Microsoft's instruction, but my compiler still comes up with the line:
d:\Programming\myprog.cpp(269): error C2065: 'CoSetProxyBlanket' : undeclared identifier
It's acting like it just isn't there. Is there a trick to getting it to work, or are there other dependencies or includes I need to add? Thanks in advance for the help!

Share this post


Link to post
Share on other sites
Never mind, I got it to work... I had to add this function prototype to my code:
WINOLEAPI CoSetProxyBlanket(
IN IUnknown *pProxy,
IN DWORD dwAuthnSvc,
IN DWORD dwAuthzSvc,
IN OLECHAR *pServerPrincName,
IN DWORD dwAuthnLevel,
IN DWORD dwImpLevel,
IN RPC_AUTH_IDENTITY_HANDLE pAuthInfo,
IN DWORD dwCapabilities );

which is strange, since it's already defined in 'objbase.h'... Oh well, it's working now so that's good enough for me! [smile]

Share this post


Link to post
Share on other sites

This topic is 3737 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this