mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 17:35:07 +00:00
[USERINIT]
- Remove two unuseful imports. - Rewrite StrToColorref to not use shell functions, and increase a bit the size of the szColor buffer in SetUserSysColors to match the capabilities of windows. svn path=/trunk/; revision=63498
This commit is contained in:
parent
63f0cf2a3a
commit
87026354cb
|
@ -2,5 +2,5 @@
|
||||||
add_executable(userinit userinit.c userinit.rc)
|
add_executable(userinit userinit.c userinit.rc)
|
||||||
target_link_libraries(userinit wine)
|
target_link_libraries(userinit wine)
|
||||||
set_module_type(userinit win32gui UNICODE)
|
set_module_type(userinit win32gui UNICODE)
|
||||||
add_importlibs(userinit user32 gdi32 advapi32 shell32 shlwapi msvcrt kernel32 ntdll)
|
add_importlibs(userinit user32 advapi32 shell32 msvcrt kernel32 ntdll)
|
||||||
add_cd_file(TARGET userinit DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET userinit DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -227,7 +227,7 @@ StartAutoApplications(
|
||||||
{
|
{
|
||||||
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && (findData.nFileSizeHigh || findData.nFileSizeLow))
|
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && (findData.nFileSizeHigh || findData.nFileSizeLow))
|
||||||
{
|
{
|
||||||
memset(&ExecInfo, 0x0, sizeof(SHELLEXECUTEINFOW));
|
ZeroMemory(&ExecInfo, sizeof(SHELLEXECUTEINFOW));
|
||||||
ExecInfo.cbSize = sizeof(ExecInfo);
|
ExecInfo.cbSize = sizeof(ExecInfo);
|
||||||
wcscpy(&szPath[len+1], findData.cFileName);
|
wcscpy(&szPath[len+1], findData.cFileName);
|
||||||
ExecInfo.lpVerb = L"open";
|
ExecInfo.lpVerb = L"open";
|
||||||
|
@ -430,11 +430,9 @@ COLORREF StrToColorref(
|
||||||
|
|
||||||
TRACE("(%s)\n", debugstr_w(lpszCol));
|
TRACE("(%s)\n", debugstr_w(lpszCol));
|
||||||
|
|
||||||
rgb[0] = StrToIntW(lpszCol);
|
rgb[0] = (BYTE)wcstoul(lpszCol, &lpszCol, 10);
|
||||||
lpszCol = StrChrW(lpszCol, L' ') + 1;
|
rgb[1] = (BYTE)wcstoul(lpszCol, &lpszCol, 10);
|
||||||
rgb[1] = StrToIntW(lpszCol);
|
rgb[2] = (BYTE)wcstoul(lpszCol, &lpszCol, 10);
|
||||||
lpszCol = StrChrW(lpszCol, L' ') + 1;
|
|
||||||
rgb[2] = StrToIntW(lpszCol);
|
|
||||||
return RGB(rgb[0], rgb[1], rgb[2]);
|
return RGB(rgb[0], rgb[1], rgb[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,7 +441,7 @@ VOID SetUserSysColors(VOID)
|
||||||
{
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
INT i;
|
INT i;
|
||||||
WCHAR szColor[20];
|
WCHAR szColor[25];
|
||||||
DWORD Type, Size;
|
DWORD Type, Size;
|
||||||
COLORREF crColor;
|
COLORREF crColor;
|
||||||
LONG rc;
|
LONG rc;
|
||||||
|
|
Loading…
Reference in a new issue