cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Micro-Nuggets !!! ~~~~ Post 'em if you got 'em

Re: Programmatically determine Windows OS bitness


BowenM wrote:

I found the need to find if an application was running on 32 or 64-bit Windows.  Forum searches only brought me to a LAVA page and a rolfk attachment that returned

 

"The page you are trying to access is not available for your account."

 


Strange! When I click on the attachment in the LAVA post I get the VI downloaded.

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 321 of 340
(629 Views)

Re: Holding Delete


GregS wrote:

Haven't seen this micro-nugget before - if you hold the Delete key down, then objects are immediately deleted as you click on them.  Not hugely useful, but who knew it?  Works on the BD and FP since at least LV2012 (earliest I can check at the moment).


I have never really know this till now. Additionally by clicking and selecting multiple items deletes them all!. Thanks for the nugget.

-----

The best solution is the one you find it by yourself
Message 322 of 340
(607 Views)

Re: Programmatically determine Windows OS bitness


rolfk wrote:


Strange! When I click on the attachment in the LAVA post I get the VI downloaded.


Log out of LAVA and try it again. I don't have an account at all.

0 Kudos
Message 323 of 340
(525 Views)

Re: Programmatically determine Windows OS bitness


BowenM wrote:


Log out of LAVA and try it again. I don't have an account at all.


You can log out of LAVA?  LAVA like many forums require you to login to download off of the site.  The error message "For your account" I likely because if you aren't logged in you are on a Guest account.


  Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
Going to NI Week? Checkout the Advanced User Track sessions put on by LabVIEW experts.
And attend the community ran LAVA BBQ Tuesday evening for a chance to have discussions with other LabVIEW enthusiasts.

0 Kudos
Message 324 of 340
(503 Views)

Re: Programmatically determine Windows OS bitness


Hooovahh wrote:

BowenM wrote:


Log out of LAVA and try it again. I don't have an account at all.


You can log out of LAVA?  LAVA like many forums require you to login to download off of the site.  The error message "For your account" I likely because if you aren't logged in you are on a Guest account.


Sorry Hooovahh, Rolf

I get this from here

Capture.png

https://lavag.org/applications/core/interface/file/attachment.php?id=4191

 

until I actually log in to get this download

WINAPI Is 64 Bit OS.png

which isn't much different than the Hidden Gem

Get Current LV Bitness.png

which also depends on the LabVIEW Context as explained here

 

Message 325 of 340
(489 Views)
Highlighted

Debugging - step out from nested structures

If you press and hold the Step Out button while single stepping the nested structures, it shows the list of the things you can actually step out from:

stepout.png

 

Message 326 of 340
(468 Views)

Re: Programmatically determine Windows OS bitness


Jeff·Þ·Bohrer wrote:
which isn't much different than the Hidden Gem

I never said it was, and as far as chronology goes, the LAVA post predates the Gem quite a bit. Smiley Happy

 

which also depends on the LabVIEW Context


What do you mean by this? This conditional compile setting is not depending on the VI being part of a project like a few others. It will be always set to the value for which the VI is currently compiled, which is also deterministic outside of a project.

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 327 of 340
(422 Views)

Re: Programmatically determine Windows OS bitness


rolfk wrote:

Jeff·Þ·Bohrer wrote:
which isn't much different than the Hidden Gem

I never said it was, and as far as chronology goes, the LAVA post predates the Gem quite a bit. Smiley Happy

 

which also depends on the LabVIEW Context


What do you mean by this? This conditional compile setting is not depending on the VI being part of a project like a few others. It will be always set to the value for which the VI is currently compiled, which is also deterministic outside of a project.


We should probably branch this but...  Assume that a developer had a 64 bit processor and a 64 bit OS and LabVIEW 201x x32 and x64 installed side by side.

 

(I don't have a system like that too test)

From my understanding after reading the help.  

The vis attached to my reply will return the bitness of the LabVIEW IDE and not the bitness of the OS or CPU. 

 

The desired return is the OS bitness.  WHICH is supposed to be agnostic of the hardware or the context of the program it enables to run

0 Kudos
Message 328 of 340
(405 Views)

Re: Programmatically determine Windows OS bitness


Jeff·Þ·Bohrer wrote:

From my understanding after reading the help.  

The vis attached to my reply will return the bitness of the LabVIEW IDE and not the bitness of the OS or CPU. 

 

The desired return is the OS bitness


The logic, in my VI at least, is as follows:

 

If the current executable is 64 bit, the OS MUST be 64 bit (you can't run a 64 exe on a 32 bit system).

Otherwise determine if the current process is running as WOW64 process, if so it is a 32 bit process running in the 32 bit compatibility layer of 64 bit Windows. Otherwise it must be a 32 bit OS. 

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
Message 329 of 340
(398 Views)

Re: Programmatically determine Windows OS bitness

 Exactly. 

 

The context in which the process runs and NOT the OS bitness.  

 

(Don't Make me go full circle and suggest a hack like looking to see if a folder exists)

0 Kudos
Message 330 of 340
(389 Views)