Skip to content

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

@xxk-i

Description

@xxk-i

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(?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions