File tree Expand file tree Collapse file tree 5 files changed +8
-28
lines changed Expand file tree Collapse file tree 5 files changed +8
-28
lines changed Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ int cv::getNumberOfCPUs(void)
521
521
{
522
522
#if defined WIN32 || defined _WIN32
523
523
SYSTEM_INFO sysinfo;
524
- #if defined(_M_ARM) || defined(_M_X64) || defined(WINRT)
524
+ #if ( defined(_M_ARM) || defined(_M_X64) || defined(WINRT)) && _WIN32_WINNT >= 0x501
525
525
GetNativeSystemInfo ( &sysinfo );
526
526
#else
527
527
GetSystemInfo ( &sysinfo );
Original file line number Diff line number Diff line change 63
63
#include < assert.h>
64
64
65
65
#if defined WIN32 || defined WINCE
66
- #if !defined _WIN32_WINNT
67
- #ifdef HAVE_MSMF
68
- #define _WIN32_WINNT 0x0600 // Windows Vista
69
- #else
70
- #define _WIN32_WINNT 0x0500 // Windows 2000
71
- #endif
72
- #endif
73
-
74
66
#include < windows.h>
75
67
#undef small
76
68
#undef min
Original file line number Diff line number Diff line change 59
59
#include < assert.h>
60
60
61
61
#if defined WIN32 || defined WINCE
62
- #if !defined _WIN32_WINNT
63
- #ifdef HAVE_MSMF
64
- #define _WIN32_WINNT 0x0600 // Windows Vista
65
- #else
66
- #define _WIN32_WINNT 0x0500 // Windows 2000
67
- #endif
68
- #endif
69
-
70
62
#include < windows.h>
71
63
#undef small
72
64
#undef min
Original file line number Diff line number Diff line change @@ -65,9 +65,11 @@ static cv::Mutex _icvInitFFMPEG_mutex;
65
65
static const HMODULE cv_GetCurrentModule ()
66
66
{
67
67
HMODULE h = 0 ;
68
+ #if _WIN32_WINNT >= 0x0501
68
69
::GetModuleHandleEx (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
69
70
reinterpret_cast <LPCTSTR>(cv_GetCurrentModule),
70
71
&h);
72
+ #endif
71
73
return h;
72
74
}
73
75
#endif
@@ -98,22 +100,16 @@ class icvInitFFMPEG
98
100
icvInitFFMPEG ()
99
101
{
100
102
#if defined WIN32 || defined _WIN32
101
- # ifdef WINRT
102
- const wchar_t * module_name = L" opencv_ffmpeg"
103
+ const wchar_t * module_name_ = L" opencv_ffmpeg"
103
104
CVAUX_STRW (CV_MAJOR_VERSION) CVAUX_STRW (CV_MINOR_VERSION) CVAUX_STRW (CV_SUBMINOR_VERSION)
104
105
#if (defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__)
105
106
L" _64"
106
107
#endif
107
108
L" .dll" ;
108
-
109
- icvFFOpenCV = LoadPackagedLibrary ( module_name , 0 );
109
+ # ifdef WINRT
110
+ icvFFOpenCV = LoadPackagedLibrary ( module_name_ , 0 );
110
111
# else
111
- const std::wstring module_name = L" opencv_ffmpeg"
112
- CVAUX_STRW (CV_MAJOR_VERSION) CVAUX_STRW (CV_MINOR_VERSION) CVAUX_STRW (CV_SUBMINOR_VERSION)
113
- #if (defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__)
114
- L" _64"
115
- #endif
116
- L" .dll" ;
112
+ const std::wstring module_name (module_name_);
117
113
118
114
const wchar_t * ffmpeg_env_path = _wgetenv (L" OPENCV_FFMPEG_DLL_DIR" );
119
115
std::wstring module_path =
Original file line number Diff line number Diff line change 66
66
#ifdef HAVE_MSMF
67
67
#define _WIN32_WINNT 0x0600 // Windows Vista
68
68
#else
69
- #define _WIN32_WINNT 0x0500 // Windows 2000
69
+ #define _WIN32_WINNT 0x0501 // Windows XP
70
70
#endif
71
71
#endif
72
72
You can’t perform that action at this time.
0 commit comments