mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-14 23:40:12 +02:00
Leland's patch for Win98, per audacity-devel thread "Re: [Audacity-devel] any more for under the wire for rc2?" on 2011-04-05
This commit is contained in:
parent
e73cd756d2
commit
4bde2be9c6
@ -68,15 +68,40 @@ static void dprintf(const char *format, ...)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static BOOL is_vista_or_later()
|
// The VerSetConditionMask() function did not appear until Windows 2000,
|
||||||
|
// so check for it at runtime. However, post 2.0, this can be deleted
|
||||||
|
// since pre-Win2k support will be dropped.
|
||||||
|
#define VerSetConditionMask VerSetConditionMaskThunk
|
||||||
|
LONGLONG
|
||||||
|
VerSetConditionMaskThunk(ULONGLONG ConditionMask,
|
||||||
|
DWORD TypeMask,
|
||||||
|
BYTE Condition)
|
||||||
{
|
{
|
||||||
OSVERSIONINFOEX osvi;
|
|
||||||
DWORDLONG dwlConditionMask = 0;
|
|
||||||
int op=VER_GREATER_EQUAL;
|
|
||||||
|
|
||||||
// The VerifyVersionInfo() function did not appear until Windows 2000,
|
// The VerifyVersionInfo() function did not appear until Windows 2000,
|
||||||
// so check for it at runtime. However, post 2.0, this can be dropped
|
// so check for it at runtime. However, post 2.0, this can be dropped
|
||||||
// since pre-Win2k support will be dropped.
|
// since pre-Win2k support will be dropped.
|
||||||
|
typedef BOOL (WINAPI *versetconditionask)(ULONGLONG ConditionMask,
|
||||||
|
DWORD TypeMask,
|
||||||
|
BYTE Condition);
|
||||||
|
versetconditionask vscm =
|
||||||
|
(versetconditionask) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")),
|
||||||
|
"VerSetConditionMask");
|
||||||
|
if (vscm == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return vscm(ConditionMask, TypeMask, Condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The VerifyVersionInfo() function did not appear until Windows 2000,
|
||||||
|
// so check for it at runtime. However, post 2.0, this can be deleted
|
||||||
|
// since pre-Win2k support will be dropped.
|
||||||
|
#define VerifyVersionInfoA VerifyVersionInfoAThunk
|
||||||
|
BOOL
|
||||||
|
VerifyVersionInfoAThunk(LPOSVERSIONINFOEXA lpVersionInformation,
|
||||||
|
DWORD dwTypeMask,
|
||||||
|
DWORDLONG dwlConditionMask)
|
||||||
|
{
|
||||||
typedef BOOL (WINAPI *verifyversioninfo)(LPOSVERSIONINFOEXA lpVersionInformation,
|
typedef BOOL (WINAPI *verifyversioninfo)(LPOSVERSIONINFOEXA lpVersionInformation,
|
||||||
DWORD dwTypeMask,
|
DWORD dwTypeMask,
|
||||||
DWORDLONG dwlConditionMask);
|
DWORDLONG dwlConditionMask);
|
||||||
@ -87,6 +112,15 @@ static BOOL is_vista_or_later()
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return vvi(lpVersionInformation, dwTypeMask, dwlConditionMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL is_vista_or_later()
|
||||||
|
{
|
||||||
|
OSVERSIONINFOEX osvi;
|
||||||
|
DWORDLONG dwlConditionMask = 0;
|
||||||
|
int op=VER_GREATER_EQUAL;
|
||||||
|
|
||||||
// Initialize the OSVERSIONINFOEX structure.
|
// Initialize the OSVERSIONINFOEX structure.
|
||||||
|
|
||||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
|
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
|
||||||
@ -103,7 +137,7 @@ static BOOL is_vista_or_later()
|
|||||||
|
|
||||||
// Perform the test.
|
// Perform the test.
|
||||||
|
|
||||||
return vvi(
|
return VerifyVersionInfo(
|
||||||
&osvi,
|
&osvi,
|
||||||
VER_MAJORVERSION | VER_MINORVERSION,
|
VER_MAJORVERSION | VER_MINORVERSION,
|
||||||
dwlConditionMask);
|
dwlConditionMask);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user