简体   繁体   English

如何查找传递给函数的参数的字节数?

[英]How to find the number of bytes of parameters passed to the function?

I am using mingw64 to compile a DLL . 我正在使用mingw64编译DLL

I have read that: 我读过:

The name decoration for __sdtdcall-declared functions in MinGW is FunctionName@nn , where @nn is the number of bytes of parameters passed to the function. MinGW中__sdtdcall-declared函数的名称修饰为FunctionName@nn ,其中@nn是传递给该函数的参数的字节数。 By this mechanism, it's not possible to call a function with the 'wrong' type, or even with the wrong number of parameters. 通过这种机制,不可能以“错误”类型甚至错误数量的参数来调用函数。

My question is as in the title: How to find the number of bytes of parameters passed to the function? 我的问题如标题所示:如何查找传递给函数的参数的字节数?

The sizeof(type) function gives the number of bytes for a particulat data type. sizeof(type)函数给出特定数据类型的字节数。

Examples: 例子:

    See http://en.wikipedia.org/wiki/Sizeof

If your asking about strings ( char * ): 如果您询问字符串(char *):

    See http://en.wikipedia.org/wiki/Strlen#strlen

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM