diff --git a/reactos/base/applications/testsets/smss/movefile/movefile.cpp b/reactos/base/applications/testsets/smss/movefile/movefile.cpp new file mode 100644 index 00000000000..89c446d0fe4 --- /dev/null +++ b/reactos/base/applications/testsets/smss/movefile/movefile.cpp @@ -0,0 +1,193 @@ +/* + * 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 + . + + 0x0500 + 0x0600 + 0x0600 + kernel32 + user32 + movefile.cpp + movefile.rc + \ No newline at end of file diff --git a/reactos/base/applications/testsets/smss/movefile/movefile.rc b/reactos/base/applications/testsets/smss/movefile/movefile.rc new file mode 100644 index 00000000000..877f2b46020 --- /dev/null +++ b/reactos/base/applications/testsets/smss/movefile/movefile.rc @@ -0,0 +1,9 @@ +#include +#include "resource.h" + +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Move File after reboot test\0" +#define REACTOS_STR_INTERNAL_NAME "movefiletest\0" +#define REACTOS_STR_ORIGINAL_FILENAME "movefiletest.exe\0" +#include + + diff --git a/reactos/base/applications/testsets/smss/smss.rbuild b/reactos/base/applications/testsets/smss/smss.rbuild new file mode 100644 index 00000000000..bb407f85695 --- /dev/null +++ b/reactos/base/applications/testsets/smss/smss.rbuild @@ -0,0 +1,7 @@ + + + + + + + diff --git a/reactos/base/applications/testsets/testsets.rbuild b/reactos/base/applications/testsets/testsets.rbuild index f100808a24c..a0cdaa833eb 100644 --- a/reactos/base/applications/testsets/testsets.rbuild +++ b/reactos/base/applications/testsets/testsets.rbuild @@ -1,6 +1,9 @@ + + +