Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Say if I have a x64 debug dll that includes 20 functions. Is there anyway I can execute any one of them if I feed into correct parameters?
I would like to write some source code that allows me to execute the functions according to my order.
Any thoughts is highly appreciated. Thanks.
Posted
Updated 18-Oct-12 13:19pm
v2
Comments
fjdiewornncalwe 18-Oct-12 17:12pm    
If you target your solution to x64, then I shouldn't see why you can't do that.
Nick Tsui 18-Oct-12 18:08pm    
Can I ask how I should do it?
Sergey Alexandrovich Kryukov 18-Oct-12 18:46pm    
Can I ask what prevents you from doing it? There are no principle differences between x86, x86-64 or IE64 (Itanium) modes. A compiler will translate your code into any of them.
--SA
Sergey Alexandrovich Kryukov 18-Oct-12 18:56pm    
Perhaps OP wants to use a mixture of two instruction-set architectures supported by the 64-bit OS, which is the problem.
Please see my answer.
--SA
Nick Tsui 18-Oct-12 17:23pm    
Can I ask how I should do it?

1 solution

Please see my comment to the question. You don't need to do anything special to use one of the two 64-bit instruction-set architectures (x86-64 or Itanium, IE-64). To run it, you need that one of these architectures was on your hardware (CPU).

But further consideration is this: there is no a way to call a function of one executable module from some other executable module in the same process, if the two are compiled (targeted) to different instruction-set architectures. The only resolution could be separate processes collaborating over IPC. Also, on Windows, x86 is also always supported for any of the 64-bit architectures under WoW64.

That's all.

Please see:
http://en.wikipedia.org/wiki/Instruction_set_architecture[^],
http://en.wikipedia.org/wiki/WOW64[^],
http://en.wikipedia.org/wiki/X86[^],
http://en.wikipedia.org/wiki/X86-32[^],
http://en.wikipedia.org/wiki/X86-64[^],
http://en.wikipedia.org/wiki/Itanium[^].

Some advanced matter on instruction-set architectures and their interoperability:
http://en.wikipedia.org/wiki/X86_virtualization[^],
http://en.wikipedia.org/wiki/X86_calling_conventions[^],
http://en.wikipedia.org/wiki/X86_calling_conventions#x86-64_calling_conventions[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900