failed to inject with not CURRENT_PROCESS
failed to inject with not CURRENT_PROCESS
hi,
I have a program written in BCB6 Pro and latest madcollection, running as localsystem, and failed to InjectLibrary with
(ALL_SESSIONS | SYSTEM_PROCESSES) & (!CURRENT_PROCESS).
However, InjectLibrary with (ALL_SESSIONS | SYSTEM_PROCESSES) works,
is this a bug of BCB?
I have a program written in BCB6 Pro and latest madcollection, running as localsystem, and failed to InjectLibrary with
(ALL_SESSIONS | SYSTEM_PROCESSES) & (!CURRENT_PROCESS).
However, InjectLibrary with (ALL_SESSIONS | SYSTEM_PROCESSES) works,
is this a bug of BCB?
-
- Posts: 380
- Joined: Sat Dec 11, 2004 2:11 am
- Location: San Francisco Bay Area, CA USA
- Contact:
The '!' is a logical NOT. CURRENT_PROCESS is 0x08, which is non-zero. Therefore, !CURRENT_PROCESS is zero.madshi wrote:For whatever reason BCB calculates "!CURRENT_PROCESS -> 0". Don't ask my why. Strange enough "~((DWORD)CURRENT_PROCESS)" seems to work. But I don't really understand this. But well, after all I'm a Delphi programmer!
The '~' is a bitwise NOT. That inverts all the bits, as you desire here.
C requires a good source-level debugger!
-- David
Oops, I forgot that!dcsoft wrote:The '!' is a logical NOT. CURRENT_PROCESS is 0x08, which is non-zero. Therefore, !CURRENT_PROCESS is zero.madshi wrote:For whatever reason BCB calculates "!CURRENT_PROCESS -> 0". Don't ask my why. Strange enough "~((DWORD)CURRENT_PROCESS)" seems to work. But I don't really understand this. But well, after all I'm a Delphi programmer!
The '~' is a bitwise NOT. That inverts all the bits, as you desire here.
C requires a good source-level debugger!
-- David
Thanks.