Windows Restart Manager RmGetList returns ERROR_ACCESS_DENIED, why?

I have a code that starts a Restart Manager session , then calls RmRegisterResources with several files, and when it calls RmGetList , ERROR_ACCESS_DENIED (5) is returned ... But if I add Sleep for 50 ms, then try again ... It works ... why? Any ideas? Is there anything else than a dream that could be done to successfully call RmGetList.

+3
source share
1 answer

What do you mean by "works"? I tried the file with "access denied". The first call to RmGetList returned 5, the arguments remained unchanged. Even without sleep between the second call of 0, when pnProcInfoNeeded, pnProcInfo and lpdwRebootReasons are set to zero. That way you don't seem to get interesting information ...

It looks like an error, or at least an undocumented function.

0
source

All Articles