set fileMapping handle to invalid value after unmap
use proper casting to HANDLE
convert to HANDLE properly
work around buggy headers not supporting strdup function