Throw an exception when passing strings by-value as out parameters. (#21513)
* Throw an exception when passing strings by-value as out parameters.
* Fix encoding
* Don't use override in this PR.
* Clean up Marshal_In
Marshal_In was copied back into existence from Marshal_InOut. Clean it up a bit.
* Remove extraneous whitespace.
* Fix failing test.
* Remove out attribute in COM string tests.
* Add back attribute and check for exception thow in COM tests.
* Add block comment to explain the implementation of Reverse_LPWStr_OutAttr in the NETServer.
* Only throw in a CLR->Native marshalling situation.
* Fix asserts from changed code-paths used in ILWSTRMarshaler.
* Add comment and explicitly load in a null value (instead of leaving it uninitialized).
* Apply suggestions from code review
Co-Authored-By: jkoritzinsky <jkoritzinsky@gmail.com>
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>