Disable run-time checking in Visual Studio

I have a problem to get an unsuccessful check during runtime of Visual C ++ 2008 due to the fact that you have chosen too large a number for a smaller type. The error is in the external dll, so I can not fix it. So how can I turn off this runtime check for an external project.

+3
source share
2 answers

If a translation (and check) occurs in this DLL system that you cannot recompile, you cannot easily disable the check.

The only thing you can do is modify the data you pass to the DLL to avoid the problem. Or fix the binary to disable validation, which would probably not be as difficult as it is - are you good with the disassembler?

+3
source

You can always simply turn off casting to a smaller type in the project settings.

If this does not work, since the check is compiled in the dll, you can try to set the link to the dll without debugging, because the check can only be enabled for the debugging "optimized" assembly. This may affect your debugging, though, of course.

-1
source

Source: https://habr.com/ru/post/1697803/


All Articles