I also have the problem running (a recent version of )OCE built with MSVC 14.0.
To reproduce inside the OCE solution, you can change the macro add_oce_test with the line:
add_executable(${test_name} ${SOURCE_FILES})
with
add_executable(${test_name} WIN32 ${SOURCE_FILES})
And then add in boolean_ops.cpp:
#include <windows.h>
#include <stdio.h>
#include <shellapi.h>
#include <locale>
#include <codecvt>
#include <string>
int __stdcall WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd)
{
// CommandLineToArgvW has no narrow-character version, so we get the arguments in wide strings
// and then convert to regular string.
int argc;
LPWSTR* argvStringW = CommandLineToArgvW(GetCommandLineW(), &argc);
using convert_typeX = std::codecvt_utf8<wchar_t>;
std::wstring_convert<convert_typeX, wchar_t> converter;
std::vector< const char* > argv(argc); // usual const char** array used in main() functions
std::vector< std::string > argvString(argc); // this stores the strings that the argv pointers point to
for (int i = 0; i < argc; i++)
{
argvString[i] = converter.to_bytes(argvStringW[i]);
argv[i] = argvString[i].c_str();
}
LocalFree(argvStringW);
testing::InitGoogleTest(&argc, const_cast< char** >(&argv[0]));
return RUN_ALL_TESTS();
}
Finally, you can simply compile the boolean_ops_test project and run it. The same error will be generated as run time:
Debug Assertion Failed!
Program: ...vs2015-64-qt56-debug\OCE-build\bin\Debug\boolean_ops_test.exe
File: minkernel\crts\ucrt\src\appcrt\lowio\lseek.cpp
Line: 74
Expression: ("Invalid file descriptor",0)
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.