> --- Ursprüngliche Nachricht ---
> Von: Ulf Lamping <ulf.lamping@xxxxxx>
> An: ethereal-dev@xxxxxxxxxxxx
> Betreff: [Ethereal-dev] Re: [Ethereal-cvs] rev 18183: /trunk/epan/: emem.c
> Datum: Thu, 18 May 2006 10:08:00 +0200
>
> lroland@xxxxxxxxxxxx wrote:
> > User: lroland
> > Date: 2006/05/17 07:25 PM
> >
> > Log:
> > Improve fix for Bug 915 by using GetVersionEx() as it is recommended by
> Microsoft. Tested on Win98 SE.
> >
> >
> So what's the difference between:
>
> versinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
>
> and
>
> *static* OSVERSIONINFO versinfo;
>
> versinfo.dwOSVersionInfoSize = sizeof(versinfo);
>
> ?!?
>
Microsoft recommends to set versinfo.dwOSVersionInfoSize either to
sizeof(OSVERSIONINFO) or sizeof(OSVERSIONINFOEX) depending on how much
information do you want to retrieve.
I don't know if sizeof(versinfo) is equal to sizeof(OSVERSIONINFO) or equl
to sizeof(OSVERSIONINFOEX) or something completely different. I guess it is
equal to sizeof(OSVERSIONINFOEX), which isn't supported on Win9x and WinNT 4
with SP5 or less. This would explain, why GetVersionInfoEx() failed.
OSVERSIONINFO is supported on Win9x including Win95 and all WinNT versions
except for WinNT 3.5x.
However GetVersionInfoEx() might fail for another reason so the check should
be put back.
>
> You've removed the handling if GetVersionInfoEx fails, which makes your
> solution:
>
> - "Microsoft recommended"
> - fail if the call to GetVersionInfoEx fails
>
> Just because Microsoft gives examples that way doesn't mean that it's
> the right solution :-)
>
> People reported problems that the call the GetVersionInfoEx() failed on
> their machines (on Win98 First Edition, for whatever reason), so I got
> the strong feeling your solution is even worse than mine ;-)
>
> Regards, ULFL
Best Regards,
Lars
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev