{
#if defined WIN32 || defined _WIN32
SYSTEM_INFO sysinfo;
-#if defined(_M_ARM) || defined(_M_X64) || defined(WINRT)
+#if (defined(_M_ARM) || defined(_M_X64) || defined(WINRT)) && _WIN32_WINNT >= 0x501
GetNativeSystemInfo( &sysinfo );
#else
GetSystemInfo( &sysinfo );
#include <assert.h>
#if defined WIN32 || defined WINCE
- #if !defined _WIN32_WINNT
- #ifdef HAVE_MSMF
- #define _WIN32_WINNT 0x0600 // Windows Vista
- #else
- #define _WIN32_WINNT 0x0500 // Windows 2000
- #endif
- #endif
-
#include <windows.h>
#undef small
#undef min
#include <assert.h>
#if defined WIN32 || defined WINCE
- #if !defined _WIN32_WINNT
- #ifdef HAVE_MSMF
- #define _WIN32_WINNT 0x0600 // Windows Vista
- #else
- #define _WIN32_WINNT 0x0500 // Windows 2000
- #endif
- #endif
-
#include <windows.h>
#undef small
#undef min
static const HMODULE cv_GetCurrentModule()
{
HMODULE h = 0;
+#if _WIN32_WINNT >= 0x0501
::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
reinterpret_cast<LPCTSTR>(cv_GetCurrentModule),
&h);
+#endif
return h;
}
#endif
icvInitFFMPEG()
{
#if defined WIN32 || defined _WIN32
- # ifdef WINRT
- const wchar_t* module_name = L"opencv_ffmpeg"
+ const wchar_t* module_name_ = L"opencv_ffmpeg"
CVAUX_STRW(CV_MAJOR_VERSION) CVAUX_STRW(CV_MINOR_VERSION) CVAUX_STRW(CV_SUBMINOR_VERSION)
#if (defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__)
L"_64"
#endif
L".dll";
-
- icvFFOpenCV = LoadPackagedLibrary( module_name, 0 );
+ # ifdef WINRT
+ icvFFOpenCV = LoadPackagedLibrary( module_name_, 0 );
# else
- const std::wstring module_name = L"opencv_ffmpeg"
- CVAUX_STRW(CV_MAJOR_VERSION) CVAUX_STRW(CV_MINOR_VERSION) CVAUX_STRW(CV_SUBMINOR_VERSION)
- #if (defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__)
- L"_64"
- #endif
- L".dll";
+ const std::wstring module_name(module_name_);
const wchar_t* ffmpeg_env_path = _wgetenv(L"OPENCV_FFMPEG_DLL_DIR");
std::wstring module_path =