Skip to content

Commit

Permalink
[Msvc/UnmanApp] Work with decorated RTTI method names instead of undec
Browse files Browse the repository at this point in the history
  • Loading branch information
theXappy committed Nov 2, 2024
1 parent 2272277 commit 5c334b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ public override MethodImplAttributes GetMethodImplementationFlags()

public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
{
return UnmanagedRemoteFunctionsInvokeHelper.Invoke(this.App as UnmanagedRemoteApp, DeclaringType, Name, obj, parameters);
// Using MangledName as it should be more globally unique then Name
return UnmanagedRemoteFunctionsInvokeHelper.Invoke(this.App as UnmanagedRemoteApp, DeclaringType, MangledName, obj, parameters);
}

public override MethodInfo GetBaseDefinition()
Expand Down
2 changes: 1 addition & 1 deletion src/ScubaDiver/MsvcDiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ protected override string MakeInvokeResponse(ScubaDiverMessage arg)

// Search the method/ctor with the matching signature
List<TypeDump.TypeMethod> overloads = dumpedObjType.Methods.Concat(dumpedObjType.Constructors)
.Where(m => m.Name == request.MethodName)
.Where(m => m.Name == request.MethodName || m.DecoratedName == request.MethodName)
.Where(m => m.Parameters.Count == paramsList.Count + 1) // TODO: Check types
.ToList();

Expand Down

0 comments on commit 5c334b7

Please sign in to comment.