Port Windows code to NPTH.