Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #1928

Re: Windows version numbers (was: PBM_SETMARQUEE in VB6)

From "Mayayana" <mayayana@invalid.nospam>
Newsgroups comp.lang.basic.visual.misc
Subject Re: Windows version numbers (was: PBM_SETMARQUEE in VB6)
Date 2013-12-19 09:58 -0500
Organization A noiseless patient Spider
Message-ID <l8v1it$tf$1@dont-email.me> (permalink)
References (1 earlier) <memo.20131217191650.252A@jeason.cix.co.uk> <l8sdnk$nms$1@dont-email.me> <l8si4u$mn9$1@speranza.aioe.org> <l8sqsi$d2h$1@dont-email.me> <l8ucd0$sr2$1@speranza.aioe.org>

Show all headers | View raw


| >    Lying version numbers is a new one to me, though.
| > The OS version number started "lying" in Vista and
|
| How did it start lying in Vista?
|

  There was a lot of discussion about this at the time:

http://www.thedelphigeek.com/2007/02/four-ways-to-detect-vista.html

  Compatibility mode causes a false return from GetVersionEx.
Compatibility mode simply is not. So I don't test for it. I try
to make sure things just work on all systems. When Vista
came out I had a lot of scripting DLLs I give away that were
likely to have functionality blocked by UAC. So I didn't want
them to be usable on Vista/7, at least until I could update
them. I didn't want the likely scenario where someone manages
to make it work but then writes to me to complain that it
doesn't work as expected. So I needed to get the real version
number at load and act accordingly. My final solution was to use
a custom function:

Public Function IsVista() As Boolean
  Dim LRet As Long, hLib As Long, LShl As Long, L2 As Long
  Dim OSV As OSVERSIONINFO
  Dim DVI As DLLVERSIONINFO
    IsVista = False
       On Error Resume Next

'--------------------- GetVersionEx ------------------
   OSV.dwOSVersionInfoSize = Len(OSV)
   LRet = GetVersionEx(OSV)
     If (OSV.dwPlatformId = 2) And (OSV.dwMajorVersion >= 6) Then
        IsVista = True
        Exit Function
     End If

 '------------- check for Vista-only API --------------------

  LRet = 0
  hLib = LoadLibrary("kernel32.dll")
    If (hLib <> 0) Then
       LRet = GetProcAddress(hLib, "GetLocaleInfoEx")
       L2 = FreeLibrary(hLib)
    End If
      If (LRet <> 0) Then
           IsVista = True
           Exit Function
       End If

 '----------------------- shell32 dllgetversion -----------

 LRet = 0
 hLib = LoadLibrary("shell32.dll")
   If (hLib <> 0) Then
     LRet = GetProcAddress(hLib, "DllGetVersion")
     L2 = FreeLibrary(hLib)
   End If
     If (LRet <> 0) Then
         DVI.cbSize = Len(DVI)
         LRet = DllGetVersion(DVI)
           If (LRet = 0) Then
              If (DVI.dwMajorVersion = 6) And (DVI.dwBuildNumber > 5000) 
Then
                IsVista = True
              End If
           End If
     End If

End Function

  I know that your response to that will probably be something
like, "compatibility mode is supposed to work that way". Maybe
so. But it's lying. And it doesn't allow me to be responsible for
my own software. It tells me I'm on XP but it doesn't emulate
XP. If someone uses my components to do something like write
to HKLM\Software or access files in the Program Files folder on
Vista/7 it's likely to fail, where it would have worked on XP. Then
I'm the one who gets the complaint. (Not to mention other
numerous details that could change between OS versions:
Display, shell, etc. I can't assume that compatibility mode is
going to substitute for me updating and testing.)

  And I really can't say I think it's unreasonable for someone to
think my software is at fault. They did take care to run in
"compatibility mode", after all. :) So it saves everyone trouble
if I just block DLLs that haven't been updated/tested on Vista/7.


| > I had to use an alternate OSV check that checks
| > available APIs and checks the version of shell32.dll.
| > That works. But what's the Win8.1 difference?
|
| Windows 8.1 (6.3) reports that it is Windows 8 (6.2) unless your
| application explicitly says it knows about Windows 8.1 to fix
| applications that do screwy version checks and report unknown version as
| "Unsupported OS, please install a newer version" (As I said,
| compatibility hacks for shit developers)
|
    Interesting. I'm afraid I'm behind the times. At this
point I'm testing on Win7 and defining that as "should
also work fine on Win8, since that's basically the same
thing with TileCity plastered onto the Desktop".

With Microsoft so doggedly determined to convert Windows
into a locked-down services interface, I'm seriously
wondering whether I'll ever really use anything beyond Win7.
Businesses have been avoiding Win8, anyway. The way it
looks to me is that one of two things will probably happen:

1) Microsoft doesn't give up. Win9 is basically RT. Business
switches to Linux and/or cloud. The era of the Windows desktop
ends.

2) Microsoft worries, recognizing that Windows and Office are
the only products they have that anyone wants in the first place.
They then reluctantly give up on trying to create a paid services
empire, Win9 arrives as a reasonably usable OS, and Win8/8.1
becomes redefined as the biggest lemon MS ever came out
with. (MS themselves, of course, will lead the way in disowning
their own children, just as they have with ME and Vista. They're
the only company I know that succeeds with a marketing
strategy of, "You should buy our latest product, because the
last one we sold you was real junk.")

  In the current air of tablet mania, possibility #2 probably
seems farfetched to most people. It may be. On the other
hand, a world of locked-down tablets and spyware web
services is also a bit farfetched, especially for business.
Either way, I know I won't be writing trinkets for tablets
that have to be approved by MS. So if Win9 isn't a turnaround
I see no reason to wade into the sleazy muck of Metro. 

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-09 17:32 +0000
  Re: PBM_SETMARQUEE in VB6 "Farnsworth" <nospam@nospam.com> - 2013-12-09 14:37 -0500
    Re: PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-10 08:54 +0000
      Re: PBM_SETMARQUEE in VB6 "MikeD" <nobody@nowhere.edu> - 2013-12-10 05:13 -0500
        Re: PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-10 10:53 +0000
          Re: PBM_SETMARQUEE in VB6 "MikeD" <nobody@nowhere.edu> - 2013-12-10 06:05 -0500
  Re: PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-10 09:22 +0000
    Re: PBM_SETMARQUEE in VB6 john@jeasonNoSpam.cix.co.uk (John K.Eason) - 2013-12-12 18:03 +0000
      Re: PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-16 10:33 +0000
        Re: PBM_SETMARQUEE in VB6 john@jeasonNoSpam.cix.co.uk (John K.Eason) - 2013-12-16 18:59 +0000
          Re: PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-17 09:04 +0000
            Re: PBM_SETMARQUEE in VB6 john@jeasonNoSpam.cix.co.uk (John K.Eason) - 2013-12-17 19:16 +0000
              Re: PBM_SETMARQUEE in VB6 "Auric__" <not.my.real@email.address> - 2013-12-18 05:52 +0000
              Re: PBM_SETMARQUEE in VB6 "Mayayana" <mayayana@invalid.nospam> - 2013-12-18 10:07 -0500
                Re: PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-18 16:22 +0000
                Re: PBM_SETMARQUEE in VB6 "Mayayana" <mayayana@invalid.nospam> - 2013-12-18 13:52 -0500
                Re: Windows version numbers (was: PBM_SETMARQUEE in VB6) Deanna Earley <dee.earley@icode.co.uk> - 2013-12-19 08:57 +0000
                Re: Windows version numbers (was: PBM_SETMARQUEE in VB6) "Mayayana" <mayayana@invalid.nospam> - 2013-12-19 09:58 -0500
                Re: PBM_SETMARQUEE in VB6 GS <gs@somewhere.net> - 2013-12-18 12:10 -0500
  Re: PBM_SETMARQUEE in VB6 Arne Saknussemm <motz001.20.wannabet@spamgourmet.com> - 2013-12-10 11:31 +0100
    Re: PBM_SETMARQUEE in VB6 Arne Saknussemm <motz001.20.wannabet@spamgourmet.com> - 2013-12-10 11:32 +0100
      Re: PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-10 10:55 +0000
        Re: PBM_SETMARQUEE in VB6 Arne Saknussemm <motz001.20.wannabet@spamgourmet.com> - 2013-12-10 12:30 +0100
  Re: PBM_SETMARQUEE in VB6 "MikeD" <nobody@nowhere.edu> - 2013-12-10 06:00 -0500
    Re: PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-10 11:37 +0000
      Re: PBM_SETMARQUEE in VB6 "David Youngblood" <dwy@flash.net> - 2013-12-10 06:02 -0600
        Re: PBM_SETMARQUEE in VB6 Deanna Earley <dee.earley@icode.co.uk> - 2013-12-10 12:28 +0000
      Re: PBM_SETMARQUEE in VB6 "MikeD" <nobody@nowhere.edu> - 2013-12-10 07:44 -0500

csiph-web