dslreports logo
 
    All Forums Hot Topics Gallery
spc
uniqs
38

jdong
Eat A Beaver, Save A Tree.
Premium Member
join:2002-07-09
Rochester, MI

jdong to Martin34

Premium Member

to Martin34

Re: [Windows] Dr. Delete: Remove in-use files!

said by Martin34:

Did i do something wrong???

Running WinME

rgds,
Martin

That could be it... My Windows Version checking algorithm is still flawed... I guess I'll just do both 9x/ME and NT methods blindly (doesn't do any harm. MoveFileEx will just return an error on 9x, and in NT you'll just have an extra 1KB text file in your Windows folder...)

Bach
Premium Member
join:2002-02-16
Flint, MI

1 recommendation

Bach

Premium Member

said by jdong:
That could be it... My Windows Version checking algorithm is still flawed... I guess I'll just do both 9x/ME and NT methods blindly (doesn't do any harm. MoveFileEx will just return an error on 9x, and in NT you'll just have an extra 1KB text file in your Windows folder...)
Does your checking routine call GetVersionEx to determine if it's an NT technology (NT/2K/XP) platform? That function should cleanly tell you whether to use WININIT.INI or use MoveFileEx with MOVEFILE_DELAY_UNTIL_REBOOT. I use this function to branch within code needing to determine the platform:
code:

BOOL IsWinNT()
{
OSVERSIONINFO osvi;
memset(&osvi, 0, sizeof(osvi));
osvi.dwOSVersionInfoSize = sizeof(osvi);
if (GetVersionEx(&osvi))
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
return TRUE;
return FALSE;
}