add run-time detection of Windows CE version.
This commit is contained in:
parent
4a513728e8
commit
ddf9130f5c
|
@ -1,4 +1,4 @@
|
|||
/* -*-C++-*- $NetBSD: arch.cpp,v 1.5 2002/02/11 17:01:09 uch Exp $ */
|
||||
/* -*-C++-*- $NetBSD: arch.cpp,v 1.6 2002/03/02 22:01:05 uch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -126,6 +126,26 @@ Architecture::systemInfo(void)
|
|||
u_int32_t val = 0;
|
||||
SYSTEM_INFO si;
|
||||
HDC hdc;
|
||||
BOOL (*getVersionEx)(LPOSVERSIONINFO);
|
||||
|
||||
//
|
||||
// WCE200 ... GetVersionEx
|
||||
// WCE210 or later ... GetVersionExA or GetVersionExW
|
||||
// see winbase.h
|
||||
//
|
||||
getVersionEx = reinterpret_cast <BOOL(*)(LPOSVERSIONINFO)>
|
||||
(_load_func(TEXT("GetVersionEx")));
|
||||
|
||||
if (getVersionEx) {
|
||||
getVersionEx(&WinCEVersion);
|
||||
DPRINTF((TEXT("GetVersionEx\n")));
|
||||
} else {
|
||||
GetVersionEx(&WinCEVersion);
|
||||
DPRINTF((TEXT("GetVersionExW\n")));
|
||||
}
|
||||
|
||||
DPRINTF((TEXT("Windows CE %d.%d\n"), WinCEVersion.dwMajorVersion,
|
||||
WinCEVersion.dwMinorVersion));
|
||||
|
||||
GetSystemInfo(&si);
|
||||
DPRINTF((TEXT("GetSystemInfo:\n")));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hpcboot.h,v 1.3 2002/02/11 17:01:09 uch Exp $ */
|
||||
/* $NetBSD: hpcboot.h,v 1.4 2002/03/02 22:01:05 uch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -161,4 +161,7 @@ void _dbg_bit_print(u_int32_t, u_int32_t, const char *);
|
|||
#define bitdisp(a) _bitdisp((a), 0, 0, 0, 1)
|
||||
__END_DECLS
|
||||
|
||||
/* Runtime Windows CE version */
|
||||
extern OSVERSIONINFOW WinCEVersion;
|
||||
|
||||
#endif /* _HPCBOOT_H_ */
|
||||
|
|
Loading…
Reference in New Issue