-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
For an example here:
DLL-Injection/DllInjection/DllInjection/Program.cs
Lines 176 to 187 in a250c9d
| // Open handle to the target process | |
| IntPtr ProcHandle = OpenProcess( | |
| ProcessAccessFlags.All, | |
| false, | |
| ProcId); | |
| if (ProcHandle == null) | |
| { | |
| Console.ForegroundColor = ConsoleColor.Red; | |
| Console.WriteLine("[!] Handle to target process could not be obtained!"); | |
| Console.ForegroundColor = ConsoleColor.White; | |
| System.Environment.Exit(1); | |
| } |
The result will never be null, but it could be of type IntPtr.Zero, which is what you are trying to check.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels