Questions tagged [msvcrt]

MSVCRT is the Microsoft Visual C++ Runtime.

MSVCRT is the Microsoft Visual C++ Runtime. It is included in Microsoft Visual C++ Redistributable Package.

KB 2977003 lists supported Visual C++ runtime downloads from Visual C++ 2005 to 2015.

Visit C Run-Time Library Reference on MSDN to get more information.

483 questions
2
votes
1 answer

Can't get a NaN from the MSVCRT strtod/sscanf/atof functions

Is there any way to get NaNs from the Windows CRT string to float functions? Why: I'm writing an IEEE float to string converter in C with no information loss (strtod, sscanf or atof return the original float) provided the rounding mode doesn't…
Řrřola
  • 6,007
  • 1
  • 17
  • 10
2
votes
1 answer

Can I throw an exception from _CrtSetReportHook?

Assuming I'm in a C++ program, I want to convert these reports to exceptions. Is using a C++ throw statement a reasonable way to do it, or am I stuck just redirecting to stderr?
Matt Chambers
  • 2,229
  • 1
  • 25
  • 43
2
votes
1 answer

Upgrading to Universal CRT-how can I get rid of a dependency on vcruntime140.dll and msvcp140.dll?

I have a project that I'm trying to get updated to the universal CRT, and I'm still seeing a dependency on vcruntime140.dll and msvcp140.dll, which I think should have been replaced with a ucrtbase.dll, as well as api-ms-win-crt* dlls. I've…
Chris Bardon
  • 430
  • 4
  • 13
2
votes
1 answer

Do I still need to install Microsoft VC++ 2015 runtime redistributable if I already have Microsoft VC++ 2017 runtime installed?

From what I read about these posting and elsewhere, regarding the issue of why I cannot install Microsoft VC++ 2015 runtime redistributable if I already have Microsoft VC++ 2017 runtime installed. The reason for this "cannot install" is because once…
Graviton
  • 81,782
  • 146
  • 424
  • 602
2
votes
1 answer

Using version 4053 of CRT (/MD) instead of leatest greatest (5592) in DLL (VS2005 SP1)

I hope you can help me with this. I want to build a dll (statically linking other, non-third-party libraries) using version 4053 of the CRT (/MD) instead of the latest (5592) in Visual Studion 2005 SP1. I'm wondering if using the following method…
2
votes
0 answers

Ctypes fails to resolve 'stdout' from msvcrt

I am trying to redirect stdout from DLL. This question asked plenty of times, but I decided to go through this article: redirecting-all-kinds-of-stdout-in-python The problem is that when I am running this line: c_stdout =…
2
votes
1 answer

MSVC yields incorrect square root for std::uint64_t at and around max. Bug or expected?

Question: While I was writing some unit tests for integer pairing functions, I noticed a "bug" that keeps cropping up. Both std::sqrt and std::sqrtl yield the same incorrect results near the max std::uint64_t values. Is this is simply to be expected…
Jon Koelzer
  • 350
  • 2
  • 9
2
votes
2 answers

How exactly _fsopen() works?

How exactly _fsopen() works? Does Linux also has similar way of opening files which prepares the file for subsequent shared reading or writing based on shflag? Referred article here.
user1174114
  • 178
  • 1
  • 19
2
votes
1 answer

How to Avoid `msvcrt.dll` Compiling with MinGW64?

I have some C++ code that I compile to various platforms, namely Linux 32/64 bits, Windows 32/64 bits. For the Windows part, I use the latest gcc compiler provided by mingw-w64 package. The trouble I am having is that the 32-bit compilation drags…
Leandro
  • 195
  • 3
  • 11
2
votes
2 answers

Replacing MSVC CRT function with private implementation

I have an embedded IoT project that I like to first develop in part by using PC tools such as VisualStudio. My embedded project has only a flash memory for a file system, and I'd like to redirect fopen fread etc. to my own private implementation on…
jws
  • 2,171
  • 19
  • 30
2
votes
2 answers

Prevent my project from calling the __CxxFrameHandler3 (CRT function)

I was working on a none Visual C++ Runtime Library project for a few days from now, however, I had a smooth ingoing until my linker start complaining about the unresolved external symbol of the __CxxFrameHandler3 CRT function, so after searching for…
2
votes
1 answer

Compile Win32 application without particular dependencies or size bloat

I am trying to build a small Win32 application using Visual C++ 2008, but I want it to run on any modern Windows machine without having to ship additional libraries and without having to bloat its size linking them statically. I have read many…
Viotto01
  • 31
  • 1
  • 3
2
votes
1 answer

msvcrt.getch() detects space every time

Im writting a simple python code that should detect the my keystrokes but for some reason in detects space after everysingle keystroke. The code: import msvcrt print("press 'escape' to quit...") text="" while 1: char = msvcrt.getch() …
2
votes
1 answer

Where are the VS2015 UCRT Source files?

TL;DR: Where do I find the MS source files that are referenced as d:\th\minkernel\crts\ucrt\... when debugging in Visual Studio 2015. I'm trying to debug into a CRT call to see what MS is actually doing, and unfortunately it seems the ucrt source…
Martin Ba
  • 37,187
  • 33
  • 183
  • 337
2
votes
2 answers

What version of the C Run-Time Library (CRT) is being loaded?

I have an error that I suspect might be caused by different versions of the CRT being loaded on two computers running Windows 7. How do I determine which version of MSVCR90.dll in the winsxs folder is being loaded? My program is a DLL being loaded…
David Robison
  • 623
  • 1
  • 10
  • 25