Details:
A function does not work if I launch it directly
From VS2015, even if I choose "Start without debugging", it will work
The function is RtlQueryProcessDebugInformation, it always return 0xc0000022 unless I launch it from VS
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.
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.
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.
User contributions licensed under CC BY-SA 3.0