Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Create.Dll时出现了参数传入错误 #18

Open
KaimingZhu opened this issue May 10, 2019 · 0 comments
Open

使用Create.Dll时出现了参数传入错误 #18

KaimingZhu opened this issue May 10, 2019 · 0 comments

Comments

@KaimingZhu
Copy link

Hello,我最近按照您的项目,尝试自己做了一遍,可是发现没有达到和您一样预期的效果。我尝试的代码如下:
`DllInvoke dll = new DllInvoke(@"CreateDLL.dll");
get_license_str_func get_license = (get_license_str_func)dll.Inovke("get_license_str",typeof(get_license_str_func));
do_lps_func lps = (do_lps_func)dll.Inovke("do_lps",typeof(do_lps_func));

//省略部分代码:打开文件,将文件名读取至FileName变量中

var result_num = lps(FileName,2);`

结果在运行的时候出现未响应情况,经过断点分析,发现在WinForm中文件名和参数正常,但是进入dll的do_lps函数时,文件名变为null,另一值变为0。但是对您的程序进行断点分析,其直接获得了最终结果,并不显示在dll中的运行情况

我初步怀疑是自己在进行dll引用出现了问题,想请教一下您,您当时引用dll库的时候使用了哪几个步骤呢,我也好参考一下。十分感谢!

@KaimingZhu KaimingZhu changed the title 使用Create.Dll时出现了参数传入错我 使用Create.Dll时出现了参数传入错误 May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant