locked
OpenProcess Failed RRS feed

  • Question

  • Hi

    I am using VC++ 2003.

    In my C++ code OpenProcess API failed to open process MSSQLSERVER with   PROCESS_QUERY_INFORMATION.

    OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);

    It is failing for PROCESS_QUERY_INFORMATION.

    But if I do

    OpenProcess(READ_CONTROL, FALSE, pid); then it works. So here access level I have used is READ_CONTROL.

    User through which I am running this API is nonadmin on windows Server 2008 with SQL server 2005

    Can someone tell me what is access leve user should have on SQL server to run OpenProcess API with PROCESS_QUERY_INFORMATION access rights?

    Also how to set this access level? 

    Thursday, July 8, 2010 8:40 AM