T
T
Troodi Larson2017-04-14 23:35:05
Programming
Troodi Larson, 2017-04-14 23:35:05

Compiling for 86 & 64 - C++?

Greetings, I found a source that injects dll into the address space, I need to be able to display my code on the screen of a running program. But I ran into such a problem that I compiled my main program code under x32 and it works under both 64 and 32 bit systems. So why does this program only work 32 if compiled under 32, and only 64 under 64 compiler. Can this program be compiled in such a way that it works under both 32 and 64, if not, how to do the processing from a single application?
PS I think that these applications require a certain bit depth due to working with memory, but this is just my guess.
Code: https://github.com/stephenfewer/ReflectiveDLLInjection

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2017-04-15
@troodi

The problem is that you have a dll. And for a dll, the bitness of the program must match the bitness of the dll. You need both versions.

S
Stopy, 2017-04-15
@Stopy

32-bit programs will work on 64-bit systems, at least they should. The difference in allocated memory for variables. And a system with large bits doesn't care how many bits of code, if not more than it can reproduce. If wrong, correct

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question