Thursday, November 18, 2010

Check For 64-bit OS

Check whether current application is running over 64-bit OS or not you can check with following way 
IsWow64Process function  is from the Kernel32 windows library. 
you can call it by 

Dim blnIs64bit  As Boolean 
Dim  blnSuccess As Boolean = IsWow64Process(Process.GetCurrentProcess().Handle, blnIs64bit)

Defination for IsWow64Process is as below : 
<DllImport("kernel32.dll", SetLastError:=True, CallingConvention:=CallingConvention.Winapi)> _
Public Shared Function IsWow64Process(<[In]()> ByVal hProcess As IntPtr, <Out()> ByRef lpSystemInfo As Boolean) As Boolean
End Function

No comments:

Post a Comment