Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6075821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:32:14+00:00 2026-05-23T10:32:14+00:00

A x64-DLL injected into a x64-process hooking a x86-DLL fails using C++ and EasyHook.

  • 0

A x64-DLL injected into a x64-process hooking a x86-DLL fails using C++ and EasyHook.
It works if Loader, InjectionLibrary and InjectionTarget(it’s available in both versions and i need both to be hooked) are x86.
Getting the address of the exported procedure(GetProcAddress itself) isn’t a problem at x64.
The InjectionTarget has HookTarget(Kernel32.dll) as a dependency at x64 aswell.
LhInstallHook(…) returns STATUS_NOT_SUPPORTED where the source comments say that happens when:
“The target entry point contains unsupported instructions.”

Due to the fact that the source is fine for x86 builds i’ve decided to not add it.

I’ve scratched a little diagram
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:32:15+00:00Added an answer on May 23, 2026 at 10:32 am

    You cannot use a 32-bit DLL in a 64bit process, and indeed, this generalizes- you cannot mix and match x86 and x64 code, a single process is either entirely x64, or entirely x86. That’s fundamental to x86-64 and there’s nothing you can do about it. In the Windows control console, they make a 64bit process and a 32bit process and use IPC to control the 32bit process to load and deal with all the 32bit shell extensions. You could try something similar, if you’re brave and/or desperate.

    Edit: Wait a minute, wait a minute. Could you describe this process a little more at basics when everything works fine in x86 mode? Like, X loads a function from Y, I am doing Z, because it appears that I don’t understand what you’re doing.

    You have an injection target, and an injected DLL, from which you’re trying to call procedures in the third-party x86-only DLL. So the normal flow of call goes from InjectionTarget -> InjectionLibrary -> HookTarget -> ExportedProcedure. And this isn’t working for you because HookTarget is x86 only and you can’t change that, so when you recompile InjectionLibrary for x64 for the x64 version of InjectionTarget, it doesn’t work anymore because your x64 InjectionLibrary is trying to load an x86 HookTarget.

    The only solution to this problem is to create an x86 process and use inter-process communication to get it to call the procedures in HookTarget that you want called. If you can’t re-compile HookTarget for x64, then this is the only way to do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple dll that is being injected into a target process using
I have a new C++/ATL DLL (x86 and x64) that I'd like to include
Using Delphi XE on Win7 x64, have Jedi Class Library ver. 3.45, and 7z.dll
I am compiling a DLL twice (once for x86, once for x64) and I
I need to build a managed DLL, targeted for x64, and expose it via
can an x64 computer have both the x86 and x64 .net runtime installed? If
I heard on Windows x64 architecture, in order to support to run both x86
I'm using Windows Vista x64 with SP1, and I'm developing an ASP.NET app with
I believe the architecture type (x86 vs x64) is abstracted away for you when
I've got a managed c++ dll, and it builds fine in x86 format. However,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.