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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Determine x32 or x64?

JohnMattson
1-Newbie

Determine x32 or x64?

We are going to be switching to a mixed environment where we have some x32 and some x64 machines, both needing to run my Pro/TOOLKIT programs. Is there a function I can call which will tell me if I am on a x32 or x64 bit platform. The same code should work regardless, but I do need to change a few paths and namesdepending on whether it is x32 or x64, so I'd like to be able to handleboth platforms with the same program.

Thanks, John


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

John,
If you are writing a DLL then your compiled code will NOT work with both
environments. The DLL must be the same architecture as Pro/ENGINEER. What
I would do is compile a dll for both architectures and determine the
architecture at install time. Then install the appropriate DLL at that
time.

Patrick Williams
Sr. Systems Engineer II
Mechanical Engineering Solutions
Missile Systems
Raytheon Company

+1 520.545.6995 (business)
+1 520.545.6399 (fax)
-

TU/M12/8
6221 S Palo Verde Rd
Tucson, AZ 85706 USA
www.raytheon.com



This message contains information that may be confidential and privileged.
Unless you are the addressee (or authorized to receive mail for the
addressee), you should not use, copy or disclose to anyone this message or
any information contained in this message. If you have received this
message in error, please so advise the sender by reply e-mail and delete
this message. Thank you for your cooperation.


John Mattson <-> wrote on 03/31/2010 09:13:57 AM:

John

Perhaps you can use the "getenv" function and check the "PROCESSOR_ARCHITECTURE=x86" environment variable.

Michael

specify the path of dll file using $PRO_MACHINE_TYPE in protk.dat, such as:

exec_file .\$PRO_MACHINE_TYPE\myapp.dll

ProE set this variable self:

for x32: $PRO_MACHINE_TYPE=i486_nt

for x64: $PRO_MACHINE_TYPE=x86e_win64

so for the setup we can take no care of system plattform

Top Tags