LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview 2017 (x64) hanged importing a shared library

Solved!
Go to solution

@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.

0 Kudos
Message 11 of 17
(1,331 Views)

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.

0 Kudos
Message 12 of 17
(1,330 Views)

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.

0 Kudos
Message 13 of 17
(1,319 Views)

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. 

0 Kudos
Message 14 of 17
(1,316 Views)
Solution
Accepted by topic author SZFan

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 .

 

0 Kudos
Message 15 of 17
(1,313 Views)

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.

0 Kudos
Message 16 of 17
(1,306 Views)

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.

0 Kudos
Message 17 of 17
(1,291 Views)