-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
105 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Version>1.0.5</Version> | ||
<Version>1.0.6</Version> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
namespace Hosihikari.NativeInterop.Hook.ObjectOriented; | ||
|
||
public class EasyHook<TDelegate> : HookBase<TDelegate> | ||
public class EasyHook<TDelegate>(string rva, TDelegate func) : HookBase<TDelegate>(rva) | ||
where TDelegate : Delegate | ||
{ | ||
public EasyHook(string rva, TDelegate func) | ||
: base(rva) | ||
{ | ||
HookedFunc = func; | ||
} | ||
|
||
public EasyHook(TDelegate oldFunc, TDelegate newFunc) | ||
: base(SymbolHelper.QuerySymbol(oldFunc)) | ||
: this(SymbolHelper.QuerySymbol(oldFunc), newFunc) | ||
{ | ||
HookedFunc = newFunc; | ||
} | ||
|
||
public override TDelegate HookedFunc { get; } | ||
public override TDelegate HookedFunc { get; } = func; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
namespace Hosihikari.NativeInterop.Unmanaged.Attributes; | ||
|
||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Field)] | ||
public class FlagBitsAttribute : Attribute | ||
public class FlagBitsAttribute(int value) : Attribute | ||
{ | ||
public int FlagBits { get; private set; } | ||
public FlagBitsAttribute(int value) => FlagBits = value; | ||
public int FlagBits { get; private set; } = value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
namespace Hosihikari.NativeInterop.Unmanaged.Attributes; | ||
|
||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Field)] | ||
public class RVAAttribute : Attribute | ||
public class RVAAttribute(ulong rva) : Attribute | ||
{ | ||
public ulong RVA { get; private set; } | ||
|
||
public RVAAttribute(ulong rva) => RVA = rva; | ||
public ulong RVA { get; private set; } = rva; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
namespace Hosihikari.NativeInterop.Unmanaged.Attributes; | ||
|
||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Field)] | ||
public class SymbolAttribute : Attribute | ||
public class SymbolAttribute(string symbol) : Attribute | ||
{ | ||
public string Symbol { get; private set; } | ||
|
||
public SymbolAttribute(string symbol) => Symbol = symbol; | ||
public string Symbol { get; private set; } = symbol; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
namespace Hosihikari.NativeInterop.Unmanaged.Attributes; | ||
|
||
[AttributeUsage(AttributeTargets.Class)] | ||
public class VirtualCppClassAttribute : Attribute | ||
{ | ||
public VirtualCppClassAttribute() { } | ||
} | ||
public class VirtualCppClassAttribute() : Attribute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.