msvcrt

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

 ̄綄美尐妖づ 提交于 2019-12-12 22:11:10
问题 Is there any way to get NaN s 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 change. I'm under MinGW or Visual C++, so these calls go to the MSVC++ runtime. The problem is that I can't get it to parse any special values (like "Inf" or "NaN" ). Inf is OK (it's returned after parsing a value that doesn't fit in a float , such

program.exe: Native' has exited with code 255 (0xff)

血红的双手。 提交于 2019-12-12 20:04:11
问题 I am using boost threads, and everything works perfectly when compiling with /MD but I really prefer compiling with /MT instead The problem I then get is program.exe: Native' has exited with code 255 (0xff). This happens on this line: thread_1 = thread(testThread,test); after digging down deeper, I realised the problem is the fact that _crtheap equals to 0, ie: it's not initialized. as seen in mlock.c /* * Check if CRT is initialized. The check if _crtheap is initialized * will do the job.

in .Net 4: PInvokeStackImbalance Exception

心不动则不痛 提交于 2019-12-12 15:37:35
问题 I was using the strlen function from msvcrt.dll in a .Net 3.5 project. More specifically: private unsafe static extern int strlen( byte *pByte ); After migrating to .NET 4.0, if I use this function it throws a PInvokeStackImbalance exception. How can I import the .NET 3.5 msvcrt.dll or fix this exception? 回答1: I suspect that the problem is with the calling convention, you should be using Cdecl. [DllImport("msvcrt.dll", CallingConvention=CallingConvention.Cdecl)] private unsafe static extern

exiting a loop by pressing a escape key

微笑、不失礼 提交于 2019-12-12 11:08:36
问题 I am trying to exit a loop by pressing a escape key but my program doesn't work. Is there a way to do that? My code : import win32api import win32con import time from msvcrt import kbhit,getch def clickerleft(x,y): """Clicks on given position x,y Input: x -- Horizontal position in pixels, starts from top-left position y -- Vertical position in pixels, start from top-left position """ win32api.SetCursorPos((x,y)) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0) win32api.mouse_event

How to not link against msvcr100.dll?

爱⌒轻易说出口 提交于 2019-12-12 09:04:21
问题 I am compiling project in Visual Studio 10, compiled executable runs fine on win 7 but it doesnt works on win xp because of missing msvcrt100.dll. I tried to use "/NOTDEFAULTLIB" but it also removes some other external libs that i use. Is there way to not link against latest Microsoft runtime library ? Thanks in advance. 回答1: To not link against the DLL you must link against the runtime statically. To do this, go to C/C++ Properties -> Code Generation and under Runtime Library select Multi

MS Visual C++ runtime library - what for?

﹥>﹥吖頭↗ 提交于 2019-12-12 08:49:45
问题 What's in MS Visual C++ runtime library? I mean, I googled it, and I always found things like help, app xxxx gives me MS Visual C++ runtime library error, with no explanation. I thought that Windows C runtime libraries come with Windows? Not with VC++? Thanks. EDIT: First, thanks for answers. I thing now I have bad idea of runtime libraries in windows. I mean, the first part, that Windows internally has its win32 API and so, that's OK, I knew it. Also, that Win32API are from kernel and user

Is loading both release and debug version of MSVCR (or UCRT etc.) officially supported by MS?

拟墨画扇 提交于 2019-12-12 02:53:24
问题 When you link to the MS Visual C Runtime Library from your (C++) program, you normally only link against one version, the release or debug version: Either MSVCR<ver>.dll or MSVCR<ver>D.dll or with VS2015 the ucrtbase[D].dll s and their additional dependencies. Disclaimer: Mixing their usage and exchanging pointers (etc.) from one to the other will lead to crashes and insanity -- this is not what this question is about. However, when your C or C++ program links to a 3rd party (C) DLL that is

Missing appcrt140d.dll while trying to run cocos2dx Debug.win32. Where to get the dll?

烂漫一生 提交于 2019-12-11 14:25:19
问题 I cooperate on a game project in cocos2dx. I do not code, rather work on scenes in Cocos Studio. When I've tried to run .exe build in proj.win32/Debug.win32 it started to throw errors about missing .dll. I've downloaded them as it was requesting them (msvcp140d.dll, vcruntime140d.dll), but I cannot find appcrt140d.dll anywhere. What would you recommend me to do? I've tried to install C++ Redistributables without any effect. 回答1: The d suffix there means that this is a debug version of the DLL

How to check the runtime library type of a binary exe generated from VC++

。_饼干妹妹 提交于 2019-12-11 10:36:29
问题 For the purposes of troubleshooting an existing build (set of binary files, exe's, dll's, lib's). Is there a way, with command line tools from SDK or other utility to quickly check the Runtime Library Type an object file was compiled against? For example, given a .dll is obvious it was compiled against Dynamic runtime (but its still not obvious if it is the Debug or Release version). While in the case of a .exe is more difficult (to determine eithr if Dynamic/Static and Debug/Release were

ClickOnce: getting MSVCRT C++ DLLs on user's machine

筅森魡賤 提交于 2019-12-11 07:49:10
问题 I've been trying desperately to get my application (15 C# dlls and 1 C++/CLI dll with C++ Runtime DLL dependencies) to deploy with ClickOnce. I got it to work by just copying the Release folder, but ClickOnce refuses to copy the files (msvcm80.dll, msvcp80.dll and msvcr80.dll) and deploy them in this folder. I did this nutty workaround (supply msvcm80.dll, msvcp80.dll and msvcr80.dll as Content/Copy If Newer and then at startup, create the Microsoft.VC80.CRT folder, copy those DLLs, and