add some api and test on windows (mingw64)