Hi ifle,
Our view is that these issues are simply the result of bringing together two very different object models.
It isn't just a matter of
So we tried to choose reasonable mappings for the most common .NET and VBScript types. We know these mappings aren't perfect, and we'll be happy to add flexibility to accommodate legacy scripts as much as possible.
If we understand correctly, standard .NET marshaling is wrong for your original scenario at the top of this thread, because it always turns .NET
Our current plan is to go ahead with the change described above. Please let us know if you have any remaining concerns.
Cheers!
Our view is that these issues are simply the result of bringing together two very different object models.
It isn't just a matter of
null
having different meanings. Strings, for example, are full-blown objects in .NET, but in VBScript they're more like primitive values. We could have kept them separate, with no mapping between them, but that would have made ClearScript very painful to use in most scenarios.So we tried to choose reasonable mappings for the most common .NET and VBScript types. We know these mappings aren't perfect, and we'll be happy to add flexibility to accommodate legacy scripts as much as possible.
Maybe MarshalNullAsDispatch flag need to replace to the new one like MarshalNullAsNetDefault and marshal values as .NET runtime
If we understand correctly, standard .NET marshaling is wrong for your original scenario at the top of this thread, because it always turns .NET
null
into VBScript empty
, whereas your script code expects nothing
.Our current plan is to go ahead with the change described above. Please let us know if you have any remaining concerns.
Cheers!