From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI Dynamically determine 64 vs 32 bit machine

Solved!
Go to solution

Is there some API, in CVI (LabWindows), that I can use to determine the architecture, 32 vs 64 bit, of the machine my app is running on?

The reason is that I have a call to open a file under 'Program Files' but if it is a 64 bit machine I need to make the call to 'Program Files (x86)'.

 

Or possible some macro that will point to the currenly installed folder of my application?

 

Thanks

0 Kudos
Message 1 of 5
(4,767 Views)
Solution
Accepted by topic author atomic928

While I can't answer the exact question easily. I can provide some potentially helpful pointers:

  • See this question about locating "Special Folders" and how to use the windows API
  • Here is the API info.
  • Check the "Remarks" section here about 80% of the way down the page. You may be able to ask for one special folder and always get the right one, bypassing the need to determine the 32 vs 64 bit question.

All that said I don't have the answer to determining 32 vs 64 bits!

 

Hope this helps a bit.

 

Ian

0 Kudos
Message 2 of 5
(4,741 Views)

Your suggestions got me going to find the API, GetProjectDir(), which I adapted for my use.

 

Appreciate the help.

0 Kudos
Message 3 of 5
(4,715 Views)

I realize you probably don't need to differentiate between 32- and 64-bit any more, but if you ever need to again, this is how you can do it.

0 Kudos
Message 4 of 5
(4,618 Views)

Thansk LuisG,

 

Stuff like that always comes in handy.

 

I appreciate it.

0 Kudos
Message 5 of 5
(4,606 Views)