I think this is a 'bug' in FormatIP on Windows platform.
After having a look at the FormatIP function, I think it doesn't take care of the different order of 'Low Byte' & 'High Byte' on Windows compared to Linux. On Linux the function returns the correct IP address.
Maybe one of the developers can have look and fix this.