How do I get the file HANDLE from the fopen FILE structure?

Use _fileno followed by _get_osfhandle. Don’t forget to _close it when you are done. EDIT: it’s not clear to me that _get_osfhandle is supported on WinCE. However the docs for WinCE _fileno say it returns a “file handle” rather than “descriptor”. YMMV but this suggests that you can maybe just use _fileno return value directly … Read more

Visual C++ executable and missing MSVCR100d.dll

You definitely should not need the debug version of the CRT if you’re compiling in “release” mode. You can tell they’re the debug versions of the DLLs because they end with a d. More to the point, the debug version is not redistributable, so it’s not as simple as “packaging” it with your executable, or … Read more

Why does my application require Visual C++ Redistributable package

The only version of the C runtime library which is shipped by Microsoft with most of 32 bit Windows versions is msvcrt.dll. This library provides a typical set of library functions required by C and C++ programs. These include string manipulation, memory allocation, C-style input/output calls, etc. Visual Studio 6.0’s compiler links against this library, … Read more

What is the cause of “This application has requested the Runtime to terminate it in an unusual way”?

You get that message when abort() function is called. From MSDN: abort Aborts the current process and returns an error code. void abort( void ); Return Value abort does not return control to the calling process. By default, it terminates the current process and returns an exit code of 3. Remarks By default, the abort … Read more

Resolving LNK4098: defaultlib ‘MSVCRT’ conflicts with

There are 4 versions of the CRT link libraries present in vc\lib: libcmt.lib: static CRT link library for a release build (/MT) libcmtd.lib: static CRT link library for a debug build (/MTd) msvcrt.lib: import library for the release DLL version of the CRT (/MD) msvcrtd.lib: import library for the debug DLL version of the CRT … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)