port windows sdk functions to golang