LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

64 Bit Version startet nicht

Wenn ich die 64 Bit exe starte kommt folgende Fehlermeldung:

 

“...funktioniert nicht mehr

Das Programm wird aufgrund eines Problems nicht richtig ausgeführt...“

 

Obwohl beim Relaese64 und beim Debug64 keine Fehler oder Warnung kommt.

Die bisherige 32Bit Version funktioniert ohne Probleme.

Wo liegt das Problem.

Danke für die Hilfe!

0 Kudos
Message 1 of 6
(5,019 Views)

Beim öffnen des Projekts steht unscheinbar die Meldung:

 

Library Load Errors

Cannot find 64-bit program file for library 'VXI Library

0 Kudos
Message 2 of 6
(4,992 Views)

(Sorry for responding in English. I make too many grammatical mistakes in German. But you can continue writing in German, if you prefer)

 

The VXI message is expected. This is a very old library that has never been ported to 64-bit. But because this library is loaded by default in the CVI environment, this status message is displayed to warn you about the fact that you can't use it in a 64-bit program. It should be otherwise harmless.

 

I don't know why your 64-bit program isn't running. That message is an operating system message, reporting the fact that there is something wrong with the exe file. I believe that it's also the message that you get when you try to run a 64-bit program in a 32-bit version of Windows (I assume you are using a 64-bit version of Windows, correct?).

 

I'm guessing that you see this message when you try to start your program from Explorer. What message do you see when you try to start it with CVI (with either Shift+F5 or Ctrl+F5)?

 

Luis

0 Kudos
Message 3 of 6
(4,967 Views)

Danke für die Hilfe!

die folgende Funktion hatte ein problem.

GetMonitorAttribute (primaryMonitorID, ATTR_SYSTEM_MONITOR_HANDLE, &MonitorHandle);

Durch andern von "int" auf " __int64 MonitorHandle"; konnte ich das Problem beseitigten.

Leider hat der Compiler diesen fehler vorher nicht gemeldet.

 

0 Kudos
Message 4 of 6
(4,949 Views)

Wie bekomme ich heraus welche VXI Bibliothek nicht Win 64 kompatibel ist?

Kann es eine Excel Bibliothek seitens NI sein?

 

Danke!

0 Kudos
Message 5 of 6
(4,948 Views)

Concerning the mismatched data type, yes, that would have caused memory courruption, which would have probably caused your program to crash.

 

I'm sorry, I had been under the impression that your program wasn't even starting. I didn't realize that it had started but that it was crashing in the middle.

 

The important point now is that is also not correct for you to use an __int64 variable to hold the monitor handle. That will work okay in 64-bit, but not in 32-bit. The data type for that attribute is intptr_t, and that's what you should use instead:

 

monitorHandle.png

 

The intptr_t data type, if you're not familiar with it, is designed to hold integers that represent memory addresses. They are four bytes long in a 32-bit program and eight bytes long in a 64-bit program.

 

Using a pointer variable (such as void *) might also work, depending on what you do with that variable afterwards.

 

The reason the compiler didn't give you an error or warning in this case is because the compiler doesn't know about the data types of the individual attributes, or even which attribute you're accessing. All that the compiler knows is that the function takes a void * for the last parameter and the data type that you passed (the address of an int) is compatible with a void *. Therefore, no compile error.

 

Functions such as these use void * as the value parameter's data type because a flexible type like this is needed for storing the values of different attributes, with different data types.

 

Typically this type of error would be caught at run-time, by CVI's user protection, which hopefully you would have seen when you ran the debug version of your program.

 

As far as the VXI library is concerned, I'm not sure I completely understand your question. There is only one VXI library, and it is available in 32-bit only. Do you need to use this library in your program? This is a very old library that is very, very rarely used nowadays. Unless you do need to use it, you can safely ignore that message. The message isn't trying to tell you that you have a problem that you need to fix. It is merely letting you know that the VXI library isn't available for 64-bit configurations, but there's nothing for you to do in response.

 

Do you need to use Excel from your program? Excel is completely unrelated to VXI, which is why I'm somewhat confused by your question...

0 Kudos
Message 6 of 6
(4,922 Views)