Author: tkreuzer
Date: Wed Feb 9 15:56:57 2011
New Revision: 50635
URL:
http://svn.reactos.org/svn/reactos?rev=50635&view=rev
Log:
sync trunk HEAD (r50626)
Added:
branches/cmake-bringup/include/asm/syscalls.inc
- copied unchanged from r50626, trunk/reactos/include/reactos/syscalls.inc
branches/cmake-bringup/ntoskrnl/ex/zw.S
- copied unchanged from r50626, trunk/reactos/ntoskrnl/ex/zw.S
branches/cmake-bringup/ntoskrnl/include/internal/napi.h
- copied unchanged from r50626, trunk/reactos/ntoskrnl/include/internal/napi.h
branches/cmake-bringup/ntoskrnl/include/sysfuncs.h
- copied unchanged from r50626, trunk/reactos/ntoskrnl/include/sysfuncs.h
branches/cmake-bringup/ntoskrnl/ntdll.S
- copied unchanged from r50626, trunk/reactos/ntoskrnl/ntdll.S
branches/cmake-bringup/subsystems/win32/win32k/include/napi.h
- copied unchanged from r50626,
trunk/reactos/subsystems/win32/win32k/include/napi.h
branches/cmake-bringup/subsystems/win32/win32k/sys-stubs.S
- copied unchanged from r50626, trunk/reactos/subsystems/win32/win32k/sys-stubs.S
branches/cmake-bringup/subsystems/win32/win32k/w32ksvc.h
- copied unchanged from r50626, trunk/reactos/subsystems/win32/win32k/w32ksvc.h
Removed:
branches/cmake-bringup/lib/ntdllsys/
branches/cmake-bringup/lib/win32ksys/
branches/cmake-bringup/tools/nci/
Modified:
branches/cmake-bringup/ (props changed)
branches/cmake-bringup/CMakeLists.txt
branches/cmake-bringup/base/setup/usetup/cabinet.c
branches/cmake-bringup/boot/bootdata/hivedef_amd64.inf
branches/cmake-bringup/boot/bootdata/hivedef_arm.inf
branches/cmake-bringup/boot/bootdata/hivedef_i386.inf
branches/cmake-bringup/boot/freeldr/freeldr/include/fs/ntfs.h
branches/cmake-bringup/dll/win32/setupapi/cfgmgr.c
branches/cmake-bringup/dll/win32/setupapi/setupapi.spec
branches/cmake-bringup/dll/win32/syssetup/install.c
branches/cmake-bringup/dll/win32/wdmaud.drv/legacy.c
branches/cmake-bringup/dll/win32/wdmaud.drv/mixer.c
branches/cmake-bringup/include/reactos/libs/sound/mmebuddy.h
branches/cmake-bringup/lib/CMakeLists.txt
branches/cmake-bringup/lib/rtl/heap.c
branches/cmake-bringup/lib/rtl/nls.c
branches/cmake-bringup/lib/rtl/unicode.c
branches/cmake-bringup/ntoskrnl/CMakeLists.txt
branches/cmake-bringup/ntoskrnl/ke/powerpc/cpu.c
branches/cmake-bringup/ntoskrnl/mm/section.c
branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt
branches/cmake-bringup/subsystems/win32/win32k/eng/xlate.c
branches/cmake-bringup/subsystems/win32/win32k/objects/gdiobj.c
branches/cmake-bringup/tools/CMakeLists.txt
Propchange: branches/cmake-bringup/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 9 15:56:57 2011
@@ -3,4 +3,4 @@
/branches/reactx/reactos:49994-49995
/branches/ros-amd64-bringup:36852
/branches/ros-amd64-bringup/reactos:34711-34712,34741,34743,34770,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36393,36397,36443,36445,36475,36502-36503,36505,36570,36614,36852,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36987-36988,36990,36992,37019,37322-37323,37333-37334,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40120,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40926-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479-41480,41483-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43451,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43852,43857-43858,43860,43905-43907,43952,43954,43965,43969,43979,43981,43992,44002,44036-44037,44039-44040,44044-44045,44053,44065,44095,44123,44143-44144,44205,44238,44257,44259,44294,44338-44339,44385,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44634,44639,44772,44818,45124,45126-45127,45430,46394,46404,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805,46868,47472,47846-47847,47878,47882
-/trunk/reactos:48236-50570,50601-50602
+/trunk/reactos:48236-50626
Modified: branches/cmake-bringup/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
==============================================================================
--- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Wed Feb 9 15:56:57 2011
@@ -54,9 +54,9 @@
add_subdirectory(lib)
if(NOT MSVC)
- export(TARGETS widl nci gendib cabman cdmake mkhive spec2def geninc FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
- else()
- export(TARGETS nci gendib cabman cdmake mkhive spec2def geninc FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
+ export(TARGETS widl gendib cabman cdmake mkhive spec2def geninc FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
+ else()
+ export(TARGETS gendib cabman cdmake mkhive spec2def geninc FILE
${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
endif()
else()
@@ -185,40 +185,6 @@
add_subdirectory(ntoskrnl)
add_subdirectory(subsystems)
- # nci generated intermediate files
-
- list(APPEND nci_output
- ${REACTOS_BINARY_DIR}/ntoskrnl/include/internal/napi.h
- ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/include/napi.h
- ${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S
- ${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S
- ${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S
- ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys.pspec)
-
- list(APPEND nci_folders
- ${CMAKE_CURRENT_BINARY_DIR}/dll/ntdll/def
- ${CMAKE_CURRENT_BINARY_DIR}/lib/ntdllsys/ntdll
- ${CMAKE_CURRENT_BINARY_DIR}/lib/win32ksys
- ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl/include/internal
- ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl/ex
- ${CMAKE_CURRENT_BINARY_DIR}/subsystems/win32/win32k/include)
-
- file(MAKE_DIRECTORY ${nci_folders})
-
- add_custom_command(
- OUTPUT ${nci_output}
- COMMAND native-nci -arch ${ARCH} ${REACTOS_SOURCE_DIR}/ntoskrnl/sysfuncs.lst
${REACTOS_SOURCE_DIR}/subsystems/win32/win32k/w32ksvc.db ${nci_output}
- DEPENDS native-nci ${nci_folders})
-
- set_source_files_properties(${nci_output} PROPERTIES GENERATED TRUE)
-
- add_custom_target(ntdll_S ALL DEPENDS ${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S)
- add_custom_target(win32k_S ALL DEPENDS ${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S)
- add_custom_target(ntsys_pspec ALL DEPENDS
${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys.pspec)
- add_custom_target(kernel_napi ALL DEPENDS
${REACTOS_BINARY_DIR}/ntoskrnl/include/internal/napi.h)
- add_custom_target(subsystem_napi ALL DEPENDS
${REACTOS_BINARY_DIR}/subsystems/win32/win32k/include/napi.h)
- add_custom_target(kernel_zw ALL DEPENDS ${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S)
-
file(MAKE_DIRECTORY ${REACTOS_BINARY_DIR}/include/reactos)
add_custom_target(buildno_header ALL DEPENDS
${REACTOS_BINARY_DIR}/include/reactos/buildno.h)
Modified: branches/cmake-bringup/base/setup/usetup/cabinet.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/setup/usetup…
==============================================================================
--- branches/cmake-bringup/base/setup/usetup/cabinet.c [iso-8859-1] (original)
+++ branches/cmake-bringup/base/setup/usetup/cabinet.c [iso-8859-1] Wed Feb 9 15:56:57
2011
@@ -890,7 +890,7 @@
RtlInitAnsiString(&AnsiString, Search->File->FileName);
wcscpy(DestName, DestPath);
- UnicodeString.MaximumLength = sizeof(DestName) - wcslen(DestName);
+ UnicodeString.MaximumLength = sizeof(DestName) - wcslen(DestName) * sizeof(WCHAR);
UnicodeString.Buffer = DestName + wcslen(DestName);
UnicodeString.Length = 0;
RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, FALSE);
Modified: branches/cmake-bringup/boot/bootdata/hivedef_amd64.inf
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/bootdata/hiv…
==============================================================================
--- branches/cmake-bringup/boot/bootdata/hivedef_amd64.inf [iso-8859-1] (original)
+++ branches/cmake-bringup/boot/bootdata/hivedef_amd64.inf [iso-8859-1] Wed Feb 9
15:56:57 2011
@@ -97,7 +97,7 @@
HKCU,"Control Panel\Desktop","ScreenSaveTimeOut",0,"600"
HKCU,"Control
Panel\Desktop","WaitToKillAppTimeout",2,"20000"
HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,""
-HKCU,"Control Panel\Desktop","FontSmoothing",2,"0"
+HKCU,"Control Panel\Desktop","FontSmoothing",0,"0"
HKCU,"Control
Panel\Desktop","FontSmoothingOrientation",0x00010003,0x00000001
HKCU,"Control
Panel\Desktop","FontSmoothingType",0x00010003,0x00000001
HKCU,"Control
Panel\Desktop","ForegroundFlashCount",0x00010003,0x00000003
Modified: branches/cmake-bringup/boot/bootdata/hivedef_arm.inf
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/bootdata/hiv…
==============================================================================
--- branches/cmake-bringup/boot/bootdata/hivedef_arm.inf [iso-8859-1] (original)
+++ branches/cmake-bringup/boot/bootdata/hivedef_arm.inf [iso-8859-1] Wed Feb 9 15:56:57
2011
@@ -28,7 +28,7 @@
HKCU,"Control Panel\Desktop","SCRNSAVE.EXE",0x00000000,""
HKCU,"Control
Panel\Desktop","WaitToKillAppTimeout",0x00000002,"20000"
HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,""
-HKCU,"Control Panel\Desktop","FontSmoothing",2,"0"
+HKCU,"Control Panel\Desktop","FontSmoothing",0,"0"
HKCU,"Control Panel\Desktop","SmoothScroll",3,00,00,00,00
HKCU,"Control Panel\Desktop","UserPreferencesMask",3,10,00,00,80
HKCU,"Control Panel\Desktop","LowPowerActive",,"0"
Modified: branches/cmake-bringup/boot/bootdata/hivedef_i386.inf
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/bootdata/hiv…
==============================================================================
Binary files - no diff available.
Modified: branches/cmake-bringup/boot/freeldr/freeldr/include/fs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/freeldr/free…
==============================================================================
--- branches/cmake-bringup/boot/freeldr/freeldr/include/fs/ntfs.h [iso-8859-1] (original)
+++ branches/cmake-bringup/boot/freeldr/freeldr/include/fs/ntfs.h [iso-8859-1] Wed Feb 9
15:56:57 2011
@@ -1,6 +1,7 @@
/*
* FreeLoader NTFS support
* Copyright (C) 2004 Filip Navara <xnavara(a)volny.cz>
+ * Copyright (C) 2011 Pierre Schweitzer <pierre.schweitzer(a)reactos.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,16 +31,22 @@
#define NTFS_FILE_BADCLUS 8
#define NTFS_FILE_QUOTA 9
#define NTFS_FILE_UPCASE 10
+#define NTFS_FILE_EXTEND 11
#define NTFS_ATTR_TYPE_STANDARD_INFORMATION 0x10
#define NTFS_ATTR_TYPE_ATTRIBUTE_LIST 0x20
#define NTFS_ATTR_TYPE_FILENAME 0x30
+#define NTFS_ATTR_TYPE_OBJECT_ID 0x40
#define NTFS_ATTR_TYPE_SECURITY_DESCRIPTOR 0x50
+#define NTFS_ATTR_TYPE_VOLUME_NAME 0x60
+#define NTFS_ATTR_TYPE_VOLUME_INFORMATION 0x70
#define NTFS_ATTR_TYPE_DATA 0x80
#define NTFS_ATTR_TYPE_INDEX_ROOT 0x90
#define NTFS_ATTR_TYPE_INDEX_ALLOCATION 0xa0
#define NTFS_ATTR_TYPE_BITMAP 0xb0
-#define NTFS_ATTR_TYPE_SYMLINK 0xc0
+#define NTFS_ATTR_TYPE_REPARSE_POINT 0xc0
+#define NTFS_ATTR_TYPE_EA_INFORMATION 0xd0
+#define NTFS_ATTR_TYPE_EA 0xe0
#define NTFS_ATTR_TYPE_END 0xffffffff
#define NTFS_ATTR_NORMAL 0
@@ -126,7 +133,8 @@
{
ULONG ValueLength;
USHORT ValueOffset;
- USHORT Flags;
+ UCHAR Flags;
+ UCHAR Reserved;
} Resident;
// Non-resident attributes
struct
@@ -134,8 +142,8 @@
ULONGLONG LowestVCN;
ULONGLONG HighestVCN;
USHORT MappingPairsOffset;
- UCHAR CompressionUnit;
- UCHAR Reserved[5];
+ USHORT CompressionUnit;
+ UCHAR Reserved[4];
LONGLONG AllocatedSize;
LONGLONG DataSize;
LONGLONG InitializedSize;
@@ -180,7 +188,20 @@
WCHAR FileName[0];
} NTFS_FILE_NAME_ATTR, *PNTFS_FILE_NAME_ATTR;
-typedef struct {
+typedef struct
+{
+ ULONG Type;
+ USHORT RecLength;
+ UCHAR NameLength;
+ UCHAR NameOffset;
+ ULONGLONG StartingVCN;
+ ULONGLONG BaseFileRef;
+ USHORT AttrId;
+ PWCHAR Name;
+} NTFS_ATTR_LIST_ATTR, *PNTFS_ATTR_LIST_ATTR;
+
+typedef struct
+{
union
{
struct
Modified: branches/cmake-bringup/dll/win32/setupapi/cfgmgr.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/setupap…
==============================================================================
--- branches/cmake-bringup/dll/win32/setupapi/cfgmgr.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/setupapi/cfgmgr.c [iso-8859-1] Wed Feb 9 15:56:57
2011
@@ -2915,6 +2915,61 @@
RpcEndExcept;
return ret;
+}
+
+
+/***********************************************************************
+ * CM_Is_Version_Available_Ex [SETUPAPI.@]
+ */
+BOOL WINAPI CM_Is_Version_Available(
+ WORD wVersion)
+{
+ TRACE("%hu\n", wVersion);
+ return CM_Is_Version_Available_Ex(wVersion, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Is_Version_Available_Ex [SETUPAPI.@]
+ */
+BOOL WINAPI CM_Is_Version_Available_Ex(
+ WORD wVersion, HMACHINE hMachine)
+{
+ RPC_BINDING_HANDLE BindingHandle = NULL;
+ WORD wServerVersion;
+ CONFIGRET ret;
+
+ TRACE("%hu %lx\n", wVersion, hMachine);
+
+ if (wVersion <= 0x400)
+ return TRUE;
+
+ if (hMachine != NULL)
+ {
+ BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
+ if (BindingHandle == NULL)
+ return FALSE;
+ }
+ else
+ {
+ if (!PnpGetLocalHandles(&BindingHandle, NULL))
+ return FALSE;
+ }
+
+ RpcTryExcept
+ {
+ ret = PNP_GetVersion(BindingHandle, &wServerVersion);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ret = RpcStatusToCmStatus(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ if (ret != CR_SUCCESS)
+ return FALSE;
+
+ return (wServerVersion >= wVersion);
}
Modified: branches/cmake-bringup/dll/win32/setupapi/setupapi.spec
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/setupap…
==============================================================================
--- branches/cmake-bringup/dll/win32/setupapi/setupapi.spec [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/setupapi/setupapi.spec [iso-8859-1] Wed Feb 9
15:56:57 2011
@@ -137,8 +137,8 @@
@ stub CM_Invert_Range_List
@ stdcall CM_Is_Dock_Station_Present(ptr)
@ stdcall CM_Is_Dock_Station_Present_Ex(ptr long)
-@ stub CM_Is_Version_Available
-@ stub CM_Is_Version_Available_Ex
+@ stdcall CM_Is_Version_Available(long)
+@ stdcall CM_Is_Version_Available_Ex(long long)
@ stdcall CM_Locate_DevNodeA(ptr str long)
@ stdcall CM_Locate_DevNodeW(ptr wstr long)
@ stdcall CM_Locate_DevNode_ExA(ptr str long long)
Modified: branches/cmake-bringup/dll/win32/syssetup/install.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/syssetu…
==============================================================================
--- branches/cmake-bringup/dll/win32/syssetup/install.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/syssetup/install.c [iso-8859-1] Wed Feb 9 15:56:57
2011
@@ -477,15 +477,21 @@
SC_HANDLE hService = NULL;
BOOL ret = FALSE;
- hSCManager = OpenSCManager(NULL, NULL, 0);
+ hSCManager = OpenSCManagerW(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE);
if (hSCManager == NULL)
+ {
+ DPRINT1("Unable to open the service control manager.\n");
goto cleanup;
+ }
hService = OpenServiceW(hSCManager,
L"PlugPlay",
SERVICE_CHANGE_CONFIG | SERVICE_START);
if (hService == NULL)
+ {
+ DPRINT1("Unable to open PlugPlay service\n");
goto cleanup;
+ }
ret = ChangeServiceConfigW(hService,
SERVICE_NO_CHANGE,
@@ -494,11 +500,17 @@
NULL, NULL, NULL,
NULL, NULL, NULL, NULL);
if (!ret)
+ {
+ DPRINT1("Unable to change the service configuration\n");
goto cleanup;
+ }
ret = StartServiceW(hService, 0, NULL);
if (!ret)
+ {
+ DPRINT("Unable to start service\n");
goto cleanup;
+ }
ret = TRUE;
Modified: branches/cmake-bringup/dll/win32/wdmaud.drv/legacy.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/wdmaud.…
==============================================================================
--- branches/cmake-bringup/dll/win32/wdmaud.drv/legacy.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/wdmaud.drv/legacy.c [iso-8859-1] Wed Feb 9 15:56:57
2011
@@ -544,6 +544,25 @@
return MMSYSERR_NOERROR;
}
+VOID
+CALLBACK
+LegacyCompletionRoutine(
+ IN DWORD dwErrorCode,
+ IN DWORD dwNumberOfBytesTransferred,
+ IN LPOVERLAPPED lpOverlapped)
+{
+ PSOUND_OVERLAPPED Overlap;
+ PWDMAUD_DEVICE_INFO DeviceInfo;
+
+ Overlap = (PSOUND_OVERLAPPED)lpOverlapped;
+ DeviceInfo = (PWDMAUD_DEVICE_INFO)Overlap->CompletionContext;
+
+ /* Call mmebuddy overlap routine */
+ Overlap->OriginalCompletionRoutine(dwErrorCode, DeviceInfo->Header.DataUsed,
lpOverlapped);
+
+ HeapFree(GetProcessHeap(), 0, DeviceInfo);
+}
+
MMRESULT
WdmAudCommitWaveBufferByLegacy(
IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
@@ -554,7 +573,7 @@
{
HANDLE Handle;
MMRESULT Result;
- WDMAUD_DEVICE_INFO DeviceInfo;
+ PWDMAUD_DEVICE_INFO DeviceInfo;
PSOUND_DEVICE SoundDevice;
MMDEVICE_TYPE DeviceType;
BOOL Ret;
@@ -577,36 +596,52 @@
Result = GetSoundDeviceType(SoundDevice, &DeviceType);
SND_ASSERT( Result == MMSYSERR_NOERROR );
- ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO));
-
- DeviceInfo.Header.FrameExtent = Length;
+ DeviceInfo = (PWDMAUD_DEVICE_INFO)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(WDMAUD_DEVICE_INFO));
+ if (!DeviceInfo)
+ {
+ // no memory
+ return MMSYSERR_NOMEM;
+ }
+
+ DeviceInfo->Header.FrameExtent = Length;
if (DeviceType == WAVE_OUT_DEVICE_TYPE)
{
- DeviceInfo.Header.DataUsed = Length;
- }
- DeviceInfo.Header.Data = OffsetPtr;
- DeviceInfo.Header.Size = sizeof(WDMAUD_DEVICE_INFO);
- DeviceInfo.Header.PresentationTime.Numerator = 1;
- DeviceInfo.Header.PresentationTime.Denominator = 1;
- DeviceInfo.hDevice = Handle;
- DeviceInfo.DeviceType = DeviceType;
-
-
-
+ DeviceInfo->Header.DataUsed = Length;
+ }
+ DeviceInfo->Header.Data = OffsetPtr;
+ DeviceInfo->Header.Size = sizeof(WDMAUD_DEVICE_INFO);
+ DeviceInfo->Header.PresentationTime.Numerator = 1;
+ DeviceInfo->Header.PresentationTime.Denominator = 1;
+ DeviceInfo->hDevice = Handle;
+ DeviceInfo->DeviceType = DeviceType;
+
+
+ // create completion event
Overlap->Standard.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
+ if (Overlap->Standard.hEvent == NULL)
+ {
+ // no memory
+ return MMSYSERR_NOMEM;
+ }
+
+ Overlap->OriginalCompletionRoutine = CompletionRoutine;
+ Overlap->CompletionContext = (PVOID)DeviceInfo;
if (DeviceType == WAVE_OUT_DEVICE_TYPE)
{
- Ret = WriteFileEx(KernelHandle, &DeviceInfo, sizeof(WDMAUD_DEVICE_INFO),
(LPOVERLAPPED)Overlap, CompletionRoutine);
+ Ret = WriteFileEx(KernelHandle, DeviceInfo, sizeof(WDMAUD_DEVICE_INFO),
(LPOVERLAPPED)Overlap, LegacyCompletionRoutine);
if (Ret)
WaitForSingleObjectEx (KernelHandle, INFINITE, TRUE);
}
else if (DeviceType == WAVE_IN_DEVICE_TYPE)
{
- Ret = ReadFileEx(KernelHandle, &DeviceInfo, sizeof(WDMAUD_DEVICE_INFO),
(LPOVERLAPPED)Overlap, CompletionRoutine);
- //if (Ret)
- // WaitForSingleObjectEx (KernelHandle, INFINITE, TRUE);
- }
+ Ret = ReadFileEx(KernelHandle, DeviceInfo, sizeof(WDMAUD_DEVICE_INFO),
(LPOVERLAPPED)Overlap, LegacyCompletionRoutine);
+ if (Ret)
+ WaitForSingleObjectEx (KernelHandle, INFINITE, TRUE);
+ }
+
+ // close event handle
+ CloseHandle(Overlap->Standard.hEvent);
return MMSYSERR_NOERROR;
}
Modified: branches/cmake-bringup/dll/win32/wdmaud.drv/mixer.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/wdmaud.…
==============================================================================
--- branches/cmake-bringup/dll/win32/wdmaud.drv/mixer.c [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/wdmaud.drv/mixer.c [iso-8859-1] Wed Feb 9 15:56:57
2011
@@ -421,7 +421,7 @@
PSOUND_OVERLAPPED Overlap = (PSOUND_OVERLAPPED)lpOverlapped;
/* Call mmebuddy overlap routine */
- Overlap->OriginalCompletionRoutine(dwErrorCode, Overlap->OriginalBufferSize,
lpOverlapped);
+ Overlap->OriginalCompletionRoutine(dwErrorCode,
PtrToUlong(Overlap->CompletionContext), lpOverlapped);
}
MMRESULT
@@ -527,7 +527,7 @@
DeviceInfo.Header.PresentationTime.Numerator = 1;
DeviceInfo.Header.PresentationTime.Denominator = 1;
- Overlap->OriginalBufferSize = Length;
+ Overlap->CompletionContext = UlongToPtr(Length);
Overlap->OriginalCompletionRoutine = CompletionRoutine;
Overlap->Standard.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
Modified: branches/cmake-bringup/include/reactos/libs/sound/mmebuddy.h
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/l…
==============================================================================
--- branches/cmake-bringup/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] (original)
+++ branches/cmake-bringup/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] Wed Feb 9
15:56:57 2011
@@ -185,8 +185,8 @@
PWAVEHDR Header;
BOOL PerformCompletion;
- DWORD OriginalBufferSize;
LPOVERLAPPED_COMPLETION_ROUTINE OriginalCompletionRoutine;
+ PVOID CompletionContext;
} SOUND_OVERLAPPED, *PSOUND_OVERLAPPED;
Modified: branches/cmake-bringup/lib/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/CMakeLists.tx…
==============================================================================
--- branches/cmake-bringup/lib/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/CMakeLists.txt [iso-8859-1] Wed Feb 9 15:56:57 2011
@@ -14,7 +14,6 @@
add_subdirectory(fslib)
add_subdirectory(lsalib)
#add_subdirectory(nls)
-add_subdirectory(ntdllsys)
add_subdirectory(ppcmmu)
add_subdirectory(pseh)
add_subdirectory(recyclebin)
@@ -23,7 +22,6 @@
add_subdirectory(sdk)
add_subdirectory(smlib)
add_subdirectory(tdilib)
-add_subdirectory(win32ksys)
else()
Modified: branches/cmake-bringup/lib/rtl/heap.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rtl/heap.c?re…
==============================================================================
--- branches/cmake-bringup/lib/rtl/heap.c [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/rtl/heap.c [iso-8859-1] Wed Feb 9 15:56:57 2011
@@ -233,12 +233,6 @@
{
/* Clear out all flags except the last entry one */
FreeEntry->Flags &= HEAP_ENTRY_LAST_ENTRY;
- }
-
- /* Check if PreviousSize of the next entry matches ours */
- if (!(FreeEntry->Flags & HEAP_ENTRY_LAST_ENTRY))
- {
- ASSERT(((PHEAP_ENTRY)FreeEntry + BlockSize)->PreviousSize == BlockSize);
}
/* Insert it either into dedicated or non-dedicated list */
Modified: branches/cmake-bringup/lib/rtl/nls.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rtl/nls.c?rev…
==============================================================================
--- branches/cmake-bringup/lib/rtl/nls.c [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/rtl/nls.c [iso-8859-1] Wed Feb 9 15:56:57 2011
@@ -235,6 +235,8 @@
ULONG Size = 0;
ULONG i;
+ PAGED_CODE_RTL();
+
if (NlsMbCodePageTag == FALSE)
{
/* single-byte code page */
@@ -299,6 +301,8 @@
ULONG MbSize)
{
ULONG Length = 0;
+
+ PAGED_CODE_RTL();
if (!NlsMbCodePageTag)
{
@@ -503,6 +507,8 @@
{
ULONG Size = 0;
ULONG i;
+
+ PAGED_CODE_RTL();
if (NlsMbCodePageTag == FALSE)
{
Modified: branches/cmake-bringup/lib/rtl/unicode.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rtl/unicode.c…
==============================================================================
--- branches/cmake-bringup/lib/rtl/unicode.c [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/rtl/unicode.c [iso-8859-1] Wed Feb 9 15:56:57 2011
@@ -76,7 +76,14 @@
PAGED_CODE_RTL();
- Length = RtlAnsiStringToUnicodeSize(AnsiSource);
+ if (NlsMbCodePageTag == FALSE)
+ {
+ Length = AnsiSource->Length * 2 + sizeof(WCHAR);
+ }
+ else
+ {
+ Length = RtlxAnsiStringToUnicodeSize(AnsiSource);
+ }
if (Length > MAXUSHORT) return STATUS_INVALID_PARAMETER_2;
UniDest->Length = (USHORT)Length - sizeof(WCHAR);
@@ -90,6 +97,9 @@
{
return STATUS_BUFFER_OVERFLOW;
}
+
+ /* UniDest->MaximumLength must be even due to sizeof(WCHAR) being 2 */
+ ASSERT(!(UniDest->MaximumLength & 1) && UniDest->Length <=
UniDest->MaximumLength);
Status = RtlMultiByteToUnicodeN(UniDest->Buffer,
UniDest->Length,
@@ -122,6 +132,8 @@
RtlxAnsiStringToUnicodeSize(IN PCANSI_STRING AnsiString)
{
ULONG Size;
+
+ PAGED_CODE_RTL();
/* Convert from Mb String to Unicode Size */
RtlMultiByteToUnicodeSize(&Size,
@@ -963,7 +975,16 @@
PAGED_CODE_RTL();
- Length = RtlUnicodeStringToAnsiSize(UniSource);
+ ASSERT(!(UniSource->Length & 1));
+
+ if (NlsMbCodePageTag == FALSE)
+ {
+ Length = (UniSource->Length + sizeof(WCHAR)) / sizeof(WCHAR);
+ }
+ else
+ {
+ Length = RtlxUnicodeStringToAnsiSize(UniSource);
+ }
if (Length > MAXUSHORT) return STATUS_INVALID_PARAMETER_2;
AnsiDest->Length = (USHORT)Length - sizeof(CHAR);
@@ -1953,6 +1974,10 @@
{
ULONG Size;
+ PAGED_CODE_RTL();
+
+ ASSERT(!(UnicodeString->Length & 1));
+
/* Convert the Unicode String to Mb Size */
RtlUnicodeToMultiByteSize(&Size,
UnicodeString->Buffer,
Modified: branches/cmake-bringup/ntoskrnl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/CMakeLis…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/CMakeLists.txt [iso-8859-1] Wed Feb 9 15:56:57 2011
@@ -107,6 +107,7 @@
ex/work.c
ex/xipdisp.c
ex/zone.c
+ ex/zw.S
fsrtl/dbcsname.c
fsrtl/fastio.c
fsrtl/faulttol.c
@@ -269,7 +270,6 @@
vf/driver.c
wmi/wmi.c
ntoskrnl.rc
- ${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S
${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
if(ARCH MATCHES i386)
@@ -451,3 +451,5 @@
add_minicd_target(ntoskrnl reactos ntoskrnl.exe)
add_livecd_target(ntoskrnl reactos/system32)
add_importlib_target(ntoskrnl.spec)
+
+add_library(ntdllsys ntdll.S)
Modified: branches/cmake-bringup/ntoskrnl/ke/powerpc/cpu.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/ke/power…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/ke/powerpc/cpu.c [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/ke/powerpc/cpu.c [iso-8859-1] Wed Feb 9 15:56:57
2011
@@ -44,7 +44,7 @@
CPUID(IN ULONG CpuInfo[4],
IN ULONG InfoType)
{
- RtlZeroMemory(CpuInfo, sizeof(CpuInfo));
+ RtlZeroMemory(CpuInfo, 4 * sizeof(ULONG));
}
VOID
Modified: branches/cmake-bringup/ntoskrnl/mm/section.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/mm/secti…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/mm/section.c [iso-8859-1] Wed Feb 9 15:56:57 2011
@@ -689,9 +689,6 @@
if(!Intsafe_AddULong32(&nPrevVirtualEndOfSegment, pssSegments[i].VirtualAddress,
pssSegments[i].Length))
DIE(("The image is larger than 4GB\n"));
}
-
- /* spare our caller some work in validating the segments */
- *Flags = EXEFMT_LOAD_ASSUME_SEGMENTS_SORTED |
EXEFMT_LOAD_ASSUME_SEGMENTS_NO_OVERLAP;
if(nSectionAlignment >= PAGE_SIZE)
*Flags |= EXEFMT_LOAD_ASSUME_SEGMENTS_PAGE_ALIGNED;
Modified: branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt [iso-8859-1] Wed Feb 9
15:56:57 2011
@@ -192,3 +192,5 @@
add_dependencies(win32k gendib_generated subsystem_napi)
add_cab_target(win32k 1)
add_importlib_target(win32k.spec)
+
+add_library(win32ksys sys-stubs.S)
Modified: branches/cmake-bringup/subsystems/win32/win32k/eng/xlate.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] (original)
+++ branches/cmake-bringup/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] Wed Feb 9
15:56:57 2011
@@ -91,7 +91,7 @@
iColor >>= 13;
iNewColor |= iColor & 0x3E0;
- /* Copy green */
+ /* Copy blue */
iColor >>= 13;
iNewColor |= iColor & 0x1F;
@@ -417,11 +417,11 @@
pexlo->aulXlate[0] =
PALETTE_ulGetNearestPaletteIndex(ppalSrc, crSrcBackColor);
}
+ else if (ppalSrc->flFlags & PAL_RGB)
+ {
+ pexlo->aulXlate[0] = crSrcBackColor;
+ }
else if (ppalSrc->flFlags & PAL_BGR)
- {
- pexlo->aulXlate[0] = crSrcBackColor;
- }
- else if (ppalSrc->flFlags & PAL_RGB)
{
pexlo->aulXlate[0] = RGB(GetBValue(crSrcBackColor),
GetGValue(crSrcBackColor),
Modified: branches/cmake-bringup/subsystems/win32/win32k/objects/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
==============================================================================
--- branches/cmake-bringup/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1]
(original)
+++ branches/cmake-bringup/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Wed Feb
9 15:56:57 2011
@@ -272,64 +272,51 @@
FASTCALL
InterlockedPopFreeEntry(VOID)
{
- ULONG idxFirst, idxNext, idxPrev;
+ ULONG iFirst, iNext, iPrev;
PGDI_TABLE_ENTRY pEntry;
- DWORD PrevProcId;
DPRINT("Enter InterLockedPopFreeEntry\n");
- while (TRUE)
- {
- idxFirst = GdiHandleTable->FirstFree;
-
- if (!idxFirst)
+ do
+ {
+ /* Get the index and sequence number of the first free entry */
+ iFirst = GdiHandleTable->FirstFree;
+
+ /* Check if we have a free entry */
+ if (!(iFirst & GDI_HANDLE_INDEX_MASK))
{
/* Increment FirstUnused and get the new index */
- idxFirst = InterlockedIncrement((LONG*)&GdiHandleTable->FirstUnused) -
1;
-
- /* Check if we have entries left */
- if (idxFirst >= GDI_HANDLE_COUNT)
+ iFirst = InterlockedIncrement((LONG*)&GdiHandleTable->FirstUnused) -
1;
+
+ /* Check if we have unused entries left */
+ if (iFirst >= GDI_HANDLE_COUNT)
{
DPRINT1("No more gdi handles left!\n");
return 0;
}
/* Return the old index */
- return idxFirst;
+ return iFirst;
}
/* Get a pointer to the first free entry */
- pEntry = GdiHandleTable->Entries + idxFirst;
-
- /* Try to lock the entry */
- PrevProcId = InterlockedCompareExchange((LONG*)&pEntry->ProcessId, 1, 0);
- if (PrevProcId != 0)
- {
- /* The entry was locked or not free, wait and start over */
- DelayExecution();
- continue;
- }
-
- /* Sanity check: is entry really free? */
- ASSERT(((ULONG_PTR)pEntry->KernelData & ~GDI_HANDLE_INDEX_MASK) == 0);
+ pEntry = GdiHandleTable->Entries + (iFirst & GDI_HANDLE_INDEX_MASK);
+
+ /* Create a new value with an increased sequence number */
+ iNext = (USHORT)(ULONG_PTR)pEntry->KernelData;
+ iNext |= (iFirst & ~GDI_HANDLE_INDEX_MASK) + 0x10000;
/* Try to exchange the FirstFree value */
- idxNext = (ULONG_PTR)pEntry->KernelData;
- idxPrev = InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree,
- idxNext,
- idxFirst);
-
- /* Unlock the free entry */
- (void)InterlockedExchange((LONG*)&pEntry->ProcessId, 0);
-
- /* If we succeeded, break out of the loop */
- if (idxPrev == idxFirst)
- {
- break;
- }
- }
-
- return idxFirst;
+ iPrev = InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree,
+ iNext,
+ iFirst);
+ }
+ while (iPrev != iFirst);
+
+ /* Sanity check: is entry really free? */
+ ASSERT(((ULONG_PTR)pEntry->KernelData & ~GDI_HANDLE_INDEX_MASK) == 0);
+
+ return iFirst & GDI_HANDLE_INDEX_MASK;
}
/* Pushes an entry of the handle table to the free list,
@@ -338,7 +325,7 @@
FASTCALL
InterlockedPushFreeEntry(ULONG idxToFree)
{
- ULONG idxFirstFree, idxPrev;
+ ULONG iToFree, iFirst, iPrev;
PGDI_TABLE_ENTRY pFreeEntry;
DPRINT("Enter InterlockedPushFreeEntry\n");
@@ -346,18 +333,26 @@
pFreeEntry = GdiHandleTable->Entries + idxToFree;
ASSERT((pFreeEntry->Type & GDI_ENTRY_BASETYPE_MASK) == 0);
ASSERT(pFreeEntry->ProcessId == 0);
- pFreeEntry->UserData = NULL;
+ pFreeEntry->UserData = NULL; // FIXME
+ ASSERT(pFreeEntry->UserData == NULL);
do
{
- idxFirstFree = GdiHandleTable->FirstFree;
- pFreeEntry->KernelData = (PVOID)(ULONG_PTR)idxFirstFree;
-
- idxPrev = InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree,
- idxToFree,
- idxFirstFree);
- }
- while (idxPrev != idxFirstFree);
+ /* Get the current first free index and sequence number */
+ iFirst = GdiHandleTable->FirstFree;
+
+ /* Set the KernelData member to the index of the first free entry */
+ pFreeEntry->KernelData = UlongToPtr(iFirst & GDI_HANDLE_INDEX_MASK);
+
+ /* Combine new index and increased sequence number in iToFree */
+ iToFree = idxToFree | ((iFirst & ~GDI_HANDLE_INDEX_MASK) + 0x10000);
+
+ /* Try to atomically update the first free entry */
+ iPrev = InterlockedCompareExchange((LONG*)&GdiHandleTable->FirstFree,
+ iToFree,
+ iFirst);
+ }
+ while (iPrev != iFirst);
}
Modified: branches/cmake-bringup/tools/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/CMakeLists.…
==============================================================================
--- branches/cmake-bringup/tools/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/tools/CMakeLists.txt [iso-8859-1] Wed Feb 9 15:56:57 2011
@@ -6,7 +6,6 @@
add_subdirectory(gendib)
add_subdirectory(geninc)
add_subdirectory(mkhive)
-add_subdirectory(nci)
add_subdirectory(spec2def)
add_subdirectory(unicode)