Detect x64 or x86?

usvpn

Freshman
Joined
Apr 19, 2010
Messages
45
I really have no idea why there's no built-in function to detect platform, I need to know I am running on x64 or x86?
Even in .NET Framework 4.0, there's no such thing!
Well, my application is set to "Any CPU"
Can I use:
Visual Basic:
If IntPtr.Size = 8 Then
    'x64()
ElseIf IntPtr.Size = 4 Then
    'x86
End If
And make sure it will work OK on all conditions?
Or you know a better way?
Thanks
 
Back
Top