Results 1 to 6 of 6

Thread: [2005] 32-Bit Vs 64-Bit [RESOLVED]

Hybrid View

  1. #1
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] 32-Bit Vs 64-Bit

    Quote Originally Posted by Half
    Code:
    MessageBox.Show(System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE"))
    should work too but I only have 32bit XP and can't test it. Wouldn't the IntPtr size be informative too? It shows 32 here, which is to be expected in my case.
    I was under the impression that that code would provide information about the processor itself rather than the OS, but I just ran it on 32-bit Windows running on a 64-bit processor and got "x86" as the result. I have also read suggestions for using the fact that the size of an IntPtr will be 4 on 32-bit systems and 8 on 64-bit systems, which you would exploit like so:
    vb.net Code:
    1. Runtime.InteropServices.Marshal.SizeOf(GetType(IntPtr))
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    20

    Re: [2005] 32-Bit Vs 64-Bit

    Thanks to all I got it working.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width