Click here to Skip to main content
16,005,162 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question[Message Deleted] Pin
ddmcr9-Apr-06 22:29
ddmcr9-Apr-06 22:29 
AnswerRe: Deploying VS2005 application Pin
Nibu babu thomas9-Apr-06 22:32
Nibu babu thomas9-Apr-06 22:32 
AnswerRe: Deploying VS2005 application Pin
toxcct10-Apr-06 0:19
toxcct10-Apr-06 0:19 
AnswerRe: Deploying VS2005 application Pin
Cedric Moonen10-Apr-06 1:18
Cedric Moonen10-Apr-06 1:18 
Questionautomation excel problem -- with saveas command Pin
evev9-Apr-06 22:27
evev9-Apr-06 22:27 
QuestionConverting Visual C++ Projects to DLL Pin
Euphoria Stone9-Apr-06 22:24
Euphoria Stone9-Apr-06 22:24 
AnswerRe: Converting Visual C++ Projects to DLL Pin
Waldermort9-Apr-06 23:13
Waldermort9-Apr-06 23:13 
QuestionAccess Denied for Remote Host Pin
tobeymag9-Apr-06 22:02
tobeymag9-Apr-06 22:02 
I am using WMI in VC++. But there is to be a problem when i try to connect to a Remote Host . The machine I am trying to connect has Windows 2000 on it and I have Windows XP installed on my machine. Here is the code -

// Initialize Security
hrRetVal = CoInitializeSecurity(NULL,
-1,
NULL,
NULL,
RPC_C_AUTHN_LEVEL_CALL,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE,
0);


// CreateInstance
hrRetVal = CoCreateInstance(CLSID_WbemLocator,
NULL,
CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
IID_IWbemLocator,
(void **) &pWbemLocator);


BSTR bsNameSpace = SysAllocString(L"//impartials/root/cimv2");
BSTR bsUserName = SysAllocString(L"dchauhan");
BSTR bsPassword = SysAllocString(L"rajvada");


// Connect to the Server
hrRetVal = pWbemLocator->ConnectServer(bsNameSpace,
bsUserName,
bsPassword,
0,
NULL,
NULL,
0,
&pWbemServices);


// Query the Proxy Blanket for Authorization Level
hrRetVal = CoQueryProxyBlanket(pWbemServices,
NULL,
NULL,
NULL,
&dwAuthLevel,
NULL,
NULL,
NULL);


// Set the Proxy Blanket to the Authorization Level
hrRetVal = CoSetProxyBlanket(pWbemServices,
RPC_C_AUTHN_WINNT,
RPC_C_AUTHZ_NAME,
NULL,
dwAuthLevel,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE);


// Execute Query
hrRetVal = pWbemServices->ExecQuery(L"WQL",
L"Select * from Win32_Service",
WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&pEnumObject);


Over here, i receive an Access Denied error. I am not getting what is the problem. Any help would be appreciated.

TobeyMag

QuestionHow to remove menu created by MFC APPWizard in MDI Pin
bruspark9-Apr-06 21:53
bruspark9-Apr-06 21:53 
AnswerRe: How to remove menu created by MFC APPWizard in MDI Pin
Nibu babu thomas9-Apr-06 22:31
Nibu babu thomas9-Apr-06 22:31 
GeneralRe: How to remove menu created by MFC APPWizard in MDI Pin
bruspark9-Apr-06 23:31
bruspark9-Apr-06 23:31 
GeneralRe: How to remove menu created by MFC APPWizard in MDI Pin
Nibu babu thomas9-Apr-06 23:34
Nibu babu thomas9-Apr-06 23:34 
GeneralRe: How to remove menu created by MFC APPWizard in MDI Pin
bruspark10-Apr-06 14:47
bruspark10-Apr-06 14:47 
AnswerRe: How to remove menu created by MFC APPWizard in MDI Pin
Saurabh.Garg9-Apr-06 22:32
Saurabh.Garg9-Apr-06 22:32 
QuestionrootCR.cer Pin
guroo139-Apr-06 21:34
guroo139-Apr-06 21:34 
Questiongui program Pin
aaaan9-Apr-06 21:32
aaaan9-Apr-06 21:32 
AnswerRe: gui program Pin
parichaybp9-Apr-06 21:40
parichaybp9-Apr-06 21:40 
AnswerRe: gui program Pin
Christian Graus9-Apr-06 21:46
protectorChristian Graus9-Apr-06 21:46 
GeneralRe: gui program Pin
aaaan9-Apr-06 22:34
aaaan9-Apr-06 22:34 
AnswerRe: gui program Pin
Waldermort9-Apr-06 22:51
Waldermort9-Apr-06 22:51 
AnswerRe: gui program Pin
James R. Twine10-Apr-06 2:54
James R. Twine10-Apr-06 2:54 
GeneralRe: gui program Pin
David Crow10-Apr-06 3:03
David Crow10-Apr-06 3:03 
QuestionAutomation Option Pin
parichaybp9-Apr-06 21:18
parichaybp9-Apr-06 21:18 
AnswerRe: Automation Option Pin
David Crow10-Apr-06 3:04
David Crow10-Apr-06 3:04 
QuestionClosing Dialog window Pin
parichaybp9-Apr-06 21:11
parichaybp9-Apr-06 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.