Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComInterfaceGenerator provides confusing warning for arrays with [InAttribute] #88205

Closed
jtschuster opened this issue Jun 29, 2023 · 1 comment · Fixed by #88212
Closed

ComInterfaceGenerator provides confusing warning for arrays with [InAttribute] #88205

jtschuster opened this issue Jun 29, 2023 · 1 comment · Fixed by #88212

Comments

@jtschuster
Copy link
Member

When [InAttribute] is applied to an array, the generators will warn with a confusing warning

SYSLIB1051: The '[In]' attribute is not supported unless the '[Out]' attribute 
is also used. The behavior of the '[In]' attribute without the '[Out]' attribute 
is the same as the default behavior. The generated source will not handle 
marshalling of parameter 'paramName'.

The statement The behavior of the '[In]' attribute without the '[Out]' attribute is the same as the default behavior. is not true for arrays; the default behavior is [In, Out]

@ghost
Copy link

ghost commented Jun 29, 2023

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Issue Details

When [InAttribute] is applied to an array, the generators will warn with a confusing warning

SYSLIB1051: The '[In]' attribute is not supported unless the '[Out]' attribute 
is also used. The behavior of the '[In]' attribute without the '[Out]' attribute 
is the same as the default behavior. The generated source will not handle 
marshalling of parameter 'paramName'.

The statement The behavior of the '[In]' attribute without the '[Out]' attribute is the same as the default behavior. is not true for arrays; the default behavior is [In, Out]

Author: jtschuster
Assignees: jtschuster
Labels:

area-System.Runtime.InteropServices

Milestone: 8.0.0

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 29, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 13, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
1 participant