What's the difference of launching native executable from Visual Studio with launching the exe by myself?

-1

Details:

  1. A function does not work if I launch it directly

  2. From VS2015, even if I choose "Start without debugging", it will work

  3. The function is RtlQueryProcessDebugInformation, it always return 0xc0000022 unless I launch it from VS

  4. the file is a WMI provider DLL, #2 is launching it with decoupled model with a .exe. Use shared host model wmiprovse.exe always does not work.

c++
visual-studio
wmi
asked on Stack Overflow Oct 11, 2016 by N Sin

2 Answers

1

Visual Studio will attach a debugger to your process, even if it technically is a release build. That's why you can hit the stop button of the debugger. This does not apply when you start your EXE from say Explorer.

As for calling undocumented Windows functions, well, those give undocumented return values. What else did you expect? And what do you even mean with "it doesn't work"? A function works, when it behaves as documented.

answered on Stack Overflow Oct 11, 2016 by MSalters
0

thank you for your replies. The function works after 1day with reboot. I suspect it's caused by I was debugging 2 applications with both calling dbghelp.dll. This may triggered some bugs.

answered on Stack Overflow Oct 13, 2016 by N Sin

User contributions licensed under CC BY-SA 3.0