简体   繁体   English

获取通过汇编调用的函数的返回值

[英]Getting return value of a function called with assembly

I am using Microsoft Visual C++ 2010. 我正在使用Microsoft Visual C ++ 2010。

If I have a function like this: 如果我有这样的功能:

const char* blah(void);

and I want to call it like this: 我想这样称呼它:

__asm {
    call blah;
    ...
}

How do I get the return value of the function in the assembly? 如何在程序集中获取函数的返回值?

返回值在EAX寄存器中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用内联汇编获取调用我的 function 的 function 的地址 - Getting the address of the function that called my function with inline assembly 将返回值传递给引用调用的函数 - Passing return value to a function called by reference 当调用另一个模拟 function 时更改模拟 function 的返回值 - Change return value of a mock function when another mock function is called 调用新函数时返回地址值会发生什么 - What happens with return address value when new function is called 重载operator - >()来改变被调用函数的返回值 - Overloading operator->() to change return value of called function 初始化具有函数返回值的对象时未复制的复制构造函数 - Copy constructor not called when initializing an object with return value of a function 是否可以使用gtest或gmock模拟一个被调用的函数返回值? - Is it possible to mock a called function return value using gtest or gmock? 返回值与引用(在汇编中) - return value Vs reference (in assembly) 将值复制到从 c++ (nasm) 调用的程序集中 function 中的指针地址 - copying a value into the address of a pointer in an assembly function called from c++ (nasm) 在虚幻中未调用函数 - Function not getting called in Unreal
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM