Sunday, October 16, 2011

Check For 64bit Operating System VB.NET 2.0

    Public Function Is64BitOperatingSystem() As Boolean?
        Dim amount As Integer
        Try
            amount = Runtime.InteropServices.Marshal.SizeOf(IntPtr.Zero)
            If amount = 8 Then : Return True
            Else : Return False
            End If
        Catch ex As Exception
            Return Nothing
        End Try
    End Function 'End Method Is64BitOperatingSystem

No comments:

Post a Comment