Skip to content

Commit

Permalink
Merge pull request #713 from microsoft/fix710
Browse files Browse the repository at this point in the history
Declare COM structs with `partial` modifier
  • Loading branch information
AArnott committed Oct 8, 2022
2 parents 0278fb7 + effe5d0 commit c8ba011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.Windows.CsWin32/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3523,7 +3523,7 @@ private TypeDeclarationSyntax DeclareInterfaceAsStruct(TypeDefinitionHandle type
members.Add(FieldDeclaration(VariableDeclaration(PointerType(PointerType(PredefinedType(Token(SyntaxKind.VoidKeyword))))).AddVariables(VariableDeclarator(vtblFieldName.Identifier))).AddModifiers(TokenWithSpace(SyntaxKind.PrivateKeyword)));

StructDeclarationSyntax iface = StructDeclaration(ifaceName.Identifier)
.AddModifiers(TokenWithSpace(this.Visibility), TokenWithSpace(SyntaxKind.UnsafeKeyword))
.AddModifiers(TokenWithSpace(this.Visibility), TokenWithSpace(SyntaxKind.UnsafeKeyword), TokenWithSpace(SyntaxKind.PartialKeyword))
.AddMembers(members.ToArray());

if (this.FindGuidFromAttribute(typeDef) is Guid guid)
Expand Down

0 comments on commit c8ba011

Please sign in to comment.