views:

1042

answers:

1

The message defined in the title of this post, along with the HResult 0x8007007A occasionally occurs while creating an instance of a Windows Workflow Foundation Runtime.

The error text is pretty self explanitory, and using Reflector over the Workflow Foundation assemblies I have narrowed down the problem to one of the following calls in ADVAPI32.DLL.

SetKernelObjectSecurity RevertToSelf OpenProcessToken GetKernelObjectSecurity

I have eliminated RevertToSelf() because it takes no input parameters, so can't be passing in a data structure that is too small.

GetKernelObjectSecurity takes as input a structure, and this could possibly be wrong, but this error is transient, with no apparent reproduction steps.

I think have a feeling it has to do with memory management somewhere in the app, but can't track down a good definition of what the HResult means. Can anyone point me in the direction of a good definition of this HResult?

+1  A: 

I can provide some speculation.

As you say, the error message sounds pretty explanatory.

OpenProcessToken seems less likely as a candidate, since you never directly pass it the size of a memory area.

GetKernelObjectSecurity or SetKernelObjectSecurity seem like good candidates. I take it you are not calling them directly, so you don't know what logic is being used to pass a region of memory into those functions. Is it possible that e.g. there is a fixed size buffer for security descriptors in one of the libraries you are using, and that once the buffer is exhausted, it takes the remaining size of the buffer (e.g. zero) and passes it into GetKernelObjectSecurity for you?

(In general, I would expect it more likely to be from a WF runtime implementation bug like this, and not e.g. an OS bug.)