monkey0506 / native-generic-delegates

Generic C# delegates for P/Invoke.
Other
8 stars 0 forks source link

Remove diagnostic NGD1002 #9

Closed monkey0506 closed 1 year ago

monkey0506 commented 1 year ago

Removed diagnostic NGD1002 (marshalParamsAs argument must be array of correct length) reported when marshalParamsAs argument (e.g., to FromAction or FromFunctionPointer) contained a different number of elements than arguments needed for the native generic delegate (e.g., the number of arguments passed to Invoke).

If excessive MarshalAsAttribute elements are provided in the array argument, they are ignored. If too few elements are provided, then the remainder are treated as null.

Closes #5.