--- np2/win9xc/dialog/d_disk.cpp 2005/03/20 08:58:20 1.6 +++ np2/win9xc/dialog/d_disk.cpp 2011/02/15 00:51:51 1.7 @@ -321,7 +321,13 @@ const TCHAR *ext; if (!dlgs_selectwritefile(hWnd, &newdiskui, path, NELEMENTS(path))) { return; } - hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); + +#if defined(_WIN64) + hinst = reinterpret_cast(::GetWindowLongPtr(hWnd, GWLP_HINSTANCE)); +#else + hinst = reinterpret_cast(::GetWindowLong(hWnd, GWL_HINSTANCE)); +#endif + ext = file_getext(path); if (!file_cmpname(ext, str_thd)) { hddsize = 0;