1. Tracy Lamb
  2. PowerBuilder
  3. Saturday, 30 July 2022 14:31 PM UTC

Hi all,

Is there a way to determine the "bitness" of an application at runtime?  I'd like to update my About window to include (Version, 64-bit) or (Version, 32-bit).  Right now it just displays (Version).  Using PB2021 and PFC12.5.

~~~Tracy

Accepted Answer
Tracy Lamb Accepted Answer Pending Moderation
  1. Saturday, 30 July 2022 15:59 PM UTC
  2. PowerBuilder
  3. # Permalink

Thanks Chris!

The n_cst_appmanager object has an instance variable named ienv_object.  So I put the following code in the same place I'm populating  the About fields (constructor event my my inherited object inherited from n_cst_appmanager).

if (ienv_object.processbitness = 32) then
	this.of_SetVersion( "Version 11 (32 bit)" )
elseif (ienv_object.processbitness = 64) then
	this.of_SetVersion( "Version 11 (64 bit)" )
else
	this.of_SetVersion( "Version 11")
end if

~~~Tracy

Comment
  1. Chris Pollach @Appeon
  2. Saturday, 30 July 2022 21:29 PM UTC
Excellent ... that looks great Tracy!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Saturday, 30 July 2022 14:49 PM UTC
  2. PowerBuilder
  3. # 1

Hi Tracy;

 Absolutely... Have a look at the GetEnvironment() & the Environment object class (which has a bitness property that you can introspect).

HTH

Regards ... Chris 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.