Adapted to MSVC specifities (with the correct function).