Jim Dettman
jimdettman at verizon.net
Mon May 27 20:38:57 CDT 2013
FYI: The win64 constant is not for the OS; it tells you if VBA is running 64 bit or 32 bit. Poorly named I know, but it's been a long tradition that they apparently did not want to break. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, May 27, 2013 04:13 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Determining 64-bit OS I knew I was missing something simple! Thanks. Charlotte On Mon, May 27, 2013 at 11:27 AM, Dan Waters <df.waters at comcast.net> wrote: > Forgot to include: > > '-------------------------------- > Option Compare Database > Option Explicit > > Private Type OSVERSIONINFO > dwOSVersionInfoSize As Long > dwMajorVersion As Long > dwMinorVersion As Long > dwBuildNumber As Long > dwPlatformId As Long > szCSDVersion As String * 128 > End Type > > Public Declare Function GetVersionExA Lib "kernel32" (lpVersionInformation > As OSVERSIONINFO) As Integer > > Public Function WindowsVersion() As String > > Dim osinfo As OSVERSIONINFO > Dim retvalue As Integer > > osinfo.dwOSVersionInfoSize = 148 > osinfo.szCSDVersion = Space$(128) > retvalue = GetVersionExA(osinfo) > > WindowsVersion = osinfo.dwMajorVersion & "." & osinfo.dwMinorVersion & > " > Build (" & osinfo.dwBuildNumber & ") " & fTrimNull(osinfo.szCSDVersion) > > End Function > > Private Function fTrimNull(strIn As String) As String > > Dim intPos As Integer > > intPos = InStr(1, strIn, vbNullChar) > > If intPos <> 0 Then > fTrimNull = Mid$(strIn, 1, intPos - 1) > Else > fTrimNull = strIn > End If > > End Function > '--------------------------------------------- > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com