CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Aug 2000
    Location
    New Jersey
    Posts
    968

    Remote Execute (RPC) failing Win32_Process with E_ACCESSDENIED

    I'm trying to execute a command on a remote machine using WMI, and it's failing in the following line of code:
    hRes = pService->GetObject(_bstr_t(L"Win32_Process"), NULL, NULL, &pProcess, NULL);
    if(FAILED(hRes))
    {
    return E_FAIL; // Fails here
    }

    For full code, see following links:
    code.axter.com/cprocess.h
    code.axter.com/cprocess.cpp

    Does anyone know why I would get this failure, and how to fix it?
    Last edited by Axter; May 29th, 2007 at 05:13 AM.
    David Maisonave
    Author of Policy Based Synchronized Smart Pointer
    http://axter.com/smartptr


    Top ten member of C++ Expert Exchange.
    C++ Topic Area

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured