Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Why does IDebugProperty2::EnumChildren() pass a non-writable ref Guid arg?

$
0
0

Hi folks,

I'm not sure if the forum is the right place to post this issue but here goes.

It appears that Visual Studio 2015 passes a memory protected ref Guid argument in to the IDebugProperty2::EnumChildren() method.  This presents itself as an AccessViolationException if I merely try to write to the guidFilter argument.

This may not seem like a big deal because there doesn't seem to be any reason that an IDebugProperty2 implementation would want to write to this argument but it is causing me BIG headaches because we are using an Aspect Oriented Framework that has to be general, thus it always writes back any ref arguments.

Minimum repro:

int EnumChildren ( 
   enum_DEBUGPROP_INFO_FLAGS   dwFields,
   uint                        dwRadix,
   ref Guid                    guidFilter,
   uint                        dwAttribFilter,
   string                      pszNameFilter,
   uint                        dwTimeout,
   out IEnumDebugPropertyInfo2 ppEnum
)
{
  // This results in an AccessViolationException.
  guidFilter = Guid.NewGuid();
}

I haven't had a chance to see if this is a problem in later version of Visual Studio but I'm assuming it is.

Can someone please:

  • advise if this is the forum is the right spot to raise such an issue?
  • advise if/when this bug may be fixed?

Thanks,

Ben


Viewing all articles
Browse latest Browse all 4410

Trending Articles