Get ID issue with EdmCmdNode_ParentDocIDs

I can’t get id with EdmCmdNode_ParentDocIDs in IEdmCmdNode interface

IEdmCmdNode cmdNode = (IEdmCmdNode)cmdData.mpoExtra;
int childdocid = (int)cmdNode.GetProperty(EdmCmdNodeProp.EdmCmdNode_ParentDocIDs);

The Error Code is below.

Message "Method returned a COM Variant type that is not Interoperable."
System.StubHelpers.ObjectMarshaler.ConvertToManaged(IntPtr pSrcVariant)

I have actually not used that before. I would probably use let the compiler infer the type.

var childdocid = cmdNode.GetProperty(EdmCmdNodeProp.EdmCmdNode_ParentDocIDs);

i tried that but wasnt run. i get same error

Check if your pdm dlls embed interop types (from the reference properties) are set to false.

i checked it unfortunately same error

Managed Debugging Assistant 'InvalidVariant' 
  Message=Managed Debugging Assistant 'InvalidVariant' : 'An invalid VARIANT was detected during a conversion from an unmanaged VARIANT to a managed object. Passing invalid VARIANTs to the CLR can cause unexpected exceptions, corruption or data loss.'

Might worthwhile to report this to

1 Like

I found a thread from 2011 on forum.
Service Request Opened: [SR:1-24194241319]

That’s a shame :frowning: 11 years and still a bug

1 Like