记录一下怎么在WPF中调用自己用C++写好的动态库~~ 一、新建一个动态链接库(DLL): 假设需要定义一个函数 bool test(int a, bool b) { //....... } .cpp文件中的函数定义需要加前缀_stdcall: bool _stdcall test(int a, bool b) { //....... }