小编Fra*_*ank的帖子

如果在调用DLL中的函数时没有传递足够的参数,会发生什么?

在dll项目中,函数是这样的:

extern "C" __declspec(dllexport) void foo(const wchar_t* a, const wchar_t* b, const wchar_t* c)
Run Code Online (Sandbox Code Playgroud)

在另一个项目中,我将使用foo函数,但我foo在头文件中声明函数

extern "C" __declspec(dllimport) void foo(const wchar_t* a, const wchar_t* b)
Run Code Online (Sandbox Code Playgroud)

我只用两个参数调用它.

结果是成功,我认为这是关于__cdecl电话,但我想知道这是如何以及为什么这样做.

c c++ dll

15
推荐指数
1
解决办法
1753
查看次数

标签 统计

c ×1

c++ ×1

dll ×1