 jdongEat A Beaver, Save A Tree.Premium join:2002-07-09 Rochester, MI kudos:1 | reply 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...) -- Word of advice: Never trust a doctor whose office plants have died... P.S.: Thank you, Optimized, for making me premium! |
|
|
|
 BachI get Bached down but I get up againPremium join:2002-02-16 Flint, MI Reviews:
·Comcast
| 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; }
|
|