InjectLibrary Fails

contains all delphi packages mentioned below
Post Reply
manutai
Posts: 85
Joined: Sun Aug 03, 2008 1:40 am

InjectLibrary Fails

Post by manutai »

I called InjectLibrary for 32 bit dll and then i called InjectLibrary for injecting 64 bit dll in first case its success means returning -1 but in second case it returning zero means failure. and getlasterror system call returning me with error no 50 = "The request is not supported." .what should i do please response me fast waiting.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: InjectLibrary Fails

Post by madshi »

Did you call this from a 32bit or 64bit exe? Injection into 64bit processes only works if your injection process is 64bit, too.
manutai
Posts: 85
Joined: Sun Aug 03, 2008 1:40 am

Re: InjectLibrary Fails

Post by manutai »

its a 32 bit service which calls this inject library
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: InjectLibrary Fails

Post by madshi »

You've got to compile a 64bit exe to inject the 64bit hook dll. You can either compile a 64bit version of your service, or alternatively just create a small 64bit helper exe which does nothing but inject/unininject, via command line parameters or something like that. Your 32bit service could then call the 64bit helper exe.
Post Reply