Porting clock_gettime to windows

You can implement a clock_gettime() replacement for windows as follows: LARGE_INTEGER getFILETIMEoffset() { SYSTEMTIME s; FILETIME f; LARGE_INTEGER t; s.wYear = 1970; s.wMonth = 1; s.wDay = 1; s.wHour = 0; s.wMinute = 0; s.wSecond = 0; s.wMilliseconds = 0; SystemTimeToFileTime(&s, &f); t.QuadPart = f.dwHighDateTime; t.QuadPart <<= 32; t.QuadPart |= f.dwLowDateTime; return (t); } int … Read more

Get Computer Name and logged user name

Windows You can try to use GetComputerName and GetUserName, here is a example: #define INFO_BUFFER_SIZE 32767 TCHAR infoBuf[INFO_BUFFER_SIZE]; DWORD bufCharCount = INFO_BUFFER_SIZE; // Get and display the name of the computer. if( !GetComputerName( infoBuf, &bufCharCount ) ) printError( TEXT(“GetComputerName”) ); _tprintf( TEXT(“\nComputer name: %s”), infoBuf ); // Get and display the user name. if( !GetUserName( … Read more

What is WINVER?

WINVER determines the minimum platform SDK required to build your application, which in turn will determine at compile time which routines are found by the headers. You can use this to verify, at compile time, that your application will work on Windows 2000 (0x0500), for example, or on Windows XP (0x0501). MSDN’s page on Modifying … Read more

Step by step instruction to install Rust and Cargo for mingw with Msys2?

The Using Rust on Windows page you linked to dates from before rustup replaced the installer as the default option to install Rust. Installers are still available, but you should use rustup if possible, because it makes it easy to update and to use multiple toolchains at once (e.g. stable, beta and nightly). If you … Read more

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