04-10-2018 03:24 AM
@SZFan wrote:
@dkfire 已写:
Is the DLL 64-bit complied?
If you have used the same DLL with LabVIEW 8.6, I doubt that it is 64-bit. And there for your can't use it with your 64-bit LabVIEW.
Why are you using LabVIEW 64-bit?
No, the DLL was 32-bit compiled.
But I tried Labview 2017 32bit, the same thing happened.
And I also think that Labview 64bit should work fine with a 32bit dll.
LabVIEW 64 bit will not load 32 bit dll's.
04-10-2018 03:31 AM
There most be:
a) Something specific in the header file that causes the crash, and
b) Some change in LabVIEW 2017 that introduced the crash.
Without the header file, I'm afraid there's not much we can do. Those header files can be really complex, and the Wizard is not a full-fetched C pre-compiler.
Perhaps you can send the header and .dll to NI Support? I think they'd agree with NDA's from your side if required.
I tried the dll wizard once, and decided to keep configuring the CLFN manually. Wizards can be nice, but I find I like the control I have when doing it manually.
04-10-2018 04:20 AM
wiebe@CARYA 已写:
@SZFan wrote:
@dkfire 已写:
Is the DLL 64-bit complied?
If you have used the same DLL with LabVIEW 8.6, I doubt that it is 64-bit. And there for your can't use it with your 64-bit LabVIEW.
Why are you using LabVIEW 64-bit?
No, the DLL was 32-bit compiled.
But I tried Labview 2017 32bit, the same thing happened.
And I also think that Labview 64bit should work fine with a 32bit dll.
LabVIEW 64 bit will not load 32 bit dll's.
Yes! You are right!
I just checked that the VI previously imported from the dll file by LV 8.6 worked well under LabVIEW 2017 32 bit. And error occured if it was opened by LV 64bit.
04-10-2018 04:28 AM
wiebe@CARYA 已写:
There most be:
a) Something specific in the header file that causes the crash, and
b) Some change in LabVIEW 2017 that introduced the crash.
Without the header file, I'm afraid there's not much we can do. Those header files can be really complex, and the Wizard is not a full-fetched C pre-compiler.
Perhaps you can send the header and .dll to NI Support? I think they'd agree with NDA's from your side if required.
I tried the dll wizard once, and decided to keep configuring the CLFN manually. Wizards can be nice, but I find I like the control I have when doing it manually.
Thank you very much for your help.
Wizard helps a lot when there are tens of functions or more in a dll library from some company.
I will try to modify the header file and reduce function numbers. Maybe I can find where the crash happens.
04-10-2018 05:05 AM - edited 04-10-2018 05:06 AM
Now I find the reason for which the application hanged.
It is quite simple.
I deleted all notes in the header file and then the wizard worked fine.
The notes leading to crash were like this :
-------------------------------------------------------------------------
int _stdcall funcname(
int a, //Characters start with Chinese
int b, //Characters
float c //blabla
)
---------------------------------------------------------------------------
If the notes started with English words, the wizard worked well. NOTE: The labview 2017 32bit I am using is a Chinese version.
So I am sure that the wizard should have bugs in it when dealing with such header files.
Finally, I'd like to present all my thanks to people who helped above .
04-10-2018 05:22 AM - edited 04-10-2018 05:23 AM
And thank you for posting the solution. Please mark it as the solution (press "ACCEPT AS SOLUTION", or we will at some point, but it's really op to you). It will help others to use the forum.
04-10-2018 06:05 AM
wiebe@CARYA 已写:
And thank you for posting the solution. Please mark it as the solution (press "ACCEPT AS SOLUTION", or we will at some point, but it's really op to you). It will help others to use the forum.
Done!
Thank you.
And one more comment: If Labview 64bit was used to import the 32bit dll library ( with header file corrected), no error occurred and no function was listed to be imported.