You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has a StringBuilder argument type. If you compile this interface, Visual Studio will prompt an error:
Error CS8894 Cannot use 'StringBuilder' as a parameter type on a method attributed with 'UnmanagedCallersOnly'.
The text was updated successfully, but these errors were encountered:
WinFormsComInterop.SourceGenerator does not work with argument type StringBuilder.
Test interface:
Interface IQueryAssociations
https://www.pinvoke.net/default.aspx/shlwapi/AssocCreate.html
https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nn-shlwapi-iqueryassociations
In method:
void GetString(
[In] ASSOCF flags,
[In] ASSOCSTR str,
[In, MarshalAs(UnmanagedType.LPWStr)] string pwszExtra,
[Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pwszOut,
[In, Out] ref int pcchOut);
It has a StringBuilder argument type. If you compile this interface, Visual Studio will prompt an error:
Error CS8894 Cannot use 'StringBuilder' as a parameter type on a method attributed with 'UnmanagedCallersOnly'.
The text was updated successfully, but these errors were encountered: