Added a test function and some basic code for win platform