/* * PROJECT: ReactOS Test applications * LICENSE: GPL - See COPYING in the top level directory * FILE: base/applications/testsets/smss/movefile.cpp * PURPOSE: Provides testing for the "move file after reboot" * function of smss.exe/kernel32.dll * PROGRAMMERS: Dmitriy Philippov (shedon@mail.ru) */ #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include "windows.h" #include #include #include "stdlib.h" #include "string.h" void Usage() { printf(" Usage: smssTest.exe -g|c|s|d \n \ g - generate test files \n \ c - check files after reboot \n \ s - show registry entry \n \ d - delete registry value \n"); } int ShowRegValue() { BYTE lpBuff[255]; memset(lpBuff, 0, sizeof(lpBuff)); DWORD lSize = sizeof(lpBuff); HKEY hKey; LONG retValue; // test registry entry retValue = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Session Manager", 0, KEY_QUERY_VALUE, &hKey); if( ERROR_SUCCESS != retValue ) { printf("RegOpenKeyEx err=%ld \n", retValue); return 1; } retValue = RegQueryValueEx(hKey, "PendingFileRenameOperations", NULL, NULL, lpBuff, &lSize); if( ERROR_SUCCESS != retValue ) { printf("RegQueryValueEx err=%ld \n", retValue); lSize = 0; } printf("reg data: \n"); for(UINT i=0; i