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

WaitHandleCannotBeOpenedException "No handle of the given name exists" #8

Open
xxk-i opened this issue Mar 28, 2022 · 0 comments
Open

Comments

@xxk-i
Copy link

xxk-i commented Mar 28, 2022

Not sure under which repo this issue should be (related to Reloaded.Memory.Buffers). I am running the following code in a new .NET framework Console App project (4.8) set to x64:

Process process = Process.Start("notepad.exe")
Injector injector = new Injector(process)

And in the output window are the following errors:

Exception thrown: 'System.Threading.WaitHandleCannotBeOpenedException' in mscorlib.dll
No handle of the given name exists.

Exception thrown: 'System.Exception' in PeNet.dll
Cannot find corresponding section.

Each exception is thrown multiple times. Despite this, continuing to injected a DLL and calling a function still seems to work though. The DLL I am testing with is making a CreateFileA hook using the example code in the Reloaded.Hooks documentation, and the existence of the following line seems to crash the host program:

_createFileAHook = ReloadedHooks.Instance.CreateHook<CreateFileA>(CreateFileAImpl, (long)createFileAPointer);

I have verified that the createFileAPointer is valid and accurate, and also attempted to run the injector in administrator mode but notepad (or any other app) still crash.

Unsure if the two issues are related, but at any rate the PeNet exception seems to be legitimate so I am curious if it is indeed an issue.

EDIT: The crash is due to the DLL's dependencies (e.x. Reloaded.Hook.Dll) not being present at the same directory as the executable being injected to (like notepad), so unrelated I guess(?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant