Skip to content

Commit

Permalink
Second release - merry russian Xmas
Browse files Browse the repository at this point in the history
PRs:
 - aero snap reactos#1226
 - status bar reactos#991
 - image list reactos#619

New functions
 - advapi32.EventRegisterTransfer (stub)
 - kernel32.CallbackMayRunLong
 - kernel32.GetPhysicallyInstalledSystemMemory
  • Loading branch information
Getequ committed Jan 8, 2019
1 parent 88a69b4 commit 6d59809
Show file tree
Hide file tree
Showing 35 changed files with 2,919 additions and 131 deletions.
4 changes: 2 additions & 2 deletions boot/bootdata/hivedef.inf
Expand Up @@ -64,9 +64,9 @@ HKCU,"Control Panel\Desktop","ScreenSaverIsSecure",2,"1"
HKCU,"Control Panel\Desktop","ScreenSaveTimeOut",2,"600"
HKCU,"Control Panel\Desktop","WaitToKillAppTimeout",2,"20000"
HKCU,"Control Panel\Desktop","Pattern",2,"(None)"
HKCU,"Control Panel\Desktop","Wallpaper",0x00000002,""
HKCU,"Control Panel\Desktop","Wallpaper",0x00000002,"%SystemRoot%\Web\Wallpaper\wp002.bmp"
HKCU,"Control Panel\Desktop","TileWallpaper",2,"0"
HKCU,"Control Panel\Desktop","WallpaperStyle",2,"2"
HKCU,"Control Panel\Desktop","WallpaperStyle",2,"0"
HKCU,"Control Panel\Desktop","FontSmoothing",2,"1"
HKCU,"Control Panel\Desktop","FontSmoothingOrientation",0x00010003,0x00000001
HKCU,"Control Panel\Desktop","FontSmoothingType",0x00010003,0x00000001
Expand Down
6 changes: 6 additions & 0 deletions boot/bootdata/packages/reactos.dff.in
Expand Up @@ -83,6 +83,9 @@ Signature = "$Windows NT$"
62 = Resources\Themes\Modern
63 = 3rdParty

105 = Resources\Themes\Royale


.InfEnd

; Contents of disk
Expand Down Expand Up @@ -127,5 +130,8 @@ Signature = "$Windows NT$"
"modules/optional/vmx_svga.inf" 6 optional
"modules/optional/vmx_svga.sys" 3 optional
"modules/optional/wine_gecko-2.40-x86.msi" 1 optional
"modules/optional/mspatcha.dll" 2 optional
"modules/optional/wp002.bmp" 45 optional
"modules/optional/theme/Royale.msstyles" 105 optional
"boot/bootdata/bootcdregtest/AHKAppTests.cmd" 7 optional
; DON'T REMOVE THE FOLLOWING NEW LINE ! THIS MEANS YOU !
2 changes: 1 addition & 1 deletion boot/freeldr/bootsect/isoboot.S
Expand Up @@ -146,7 +146,7 @@ relocated:
call writestr_early

// Count down 5 seconds.
mov cx, 5
mov cx, 2

.next_second:
// Count in seconds using the BIOS Timer, which runs roughly at 19 ticks per second.
Expand Down
1 change: 1 addition & 0 deletions dll/ntdll/include/ntdll.h
Expand Up @@ -39,6 +39,7 @@
#include <ndk/psfuncs.h>
#include <ndk/rtlfuncs.h>
#include <ndk/umfuncs.h>
#include <xdk/winnt.h>

/* Internal NTDLL */
#include "ntdllp.h"
Expand Down
8 changes: 6 additions & 2 deletions dll/win32/advapi32/advapi32.spec
Expand Up @@ -217,6 +217,10 @@
217 stdcall EqualDomainSid(ptr ptr ptr)
218 stdcall EqualPrefixSid(ptr ptr)
219 stdcall EqualSid(ptr ptr)
@ stdcall EventWrite(ptr ptr long ptr)
@ stdcall EventWriteTransfer(ptr ptr ptr ptr long ptr)
@ stdcall EventRegister(ptr ptr ptr ptr)
@ stdcall EventUnregister(ptr)
220 stdcall FileEncryptionStatusA(str ptr)
221 stdcall FileEncryptionStatusW(wstr ptr)
222 stdcall FindFirstFreeAce(ptr ptr)
Expand Down Expand Up @@ -682,5 +686,5 @@
682 stub WmiSetSingleItemW
683 stub Wow64Win32ApiEntry
684 stdcall WriteEncryptedFileRaw(ptr ptr ptr)
685 stdcall -version=0x600+ RegLoadMUIStringW(ptr wstr wstr long ptr long wstr) advapi32_vista.RegLoadMUIStringW
686 stdcall -version=0x600+ RegLoadMUIStringA(ptr str str long ptr long str) advapi32_vista.RegLoadMUIStringA
685 stdcall RegLoadMUIStringW(ptr wstr wstr long ptr long wstr) advapi32_vista.RegLoadMUIStringW
686 stdcall RegLoadMUIStringA(ptr str str long ptr long str) advapi32_vista.RegLoadMUIStringA
84 changes: 84 additions & 0 deletions dll/win32/advapi32/misc/evntrace.c
Expand Up @@ -41,3 +41,87 @@ ProcessTrace(IN PTRACEHANDLE HandleArray,
return ERROR_NOACCESS;
}



typedef HANDLE REGHANDLE;

typedef struct _EVENT_DESCRIPTOR {
USHORT Id;
UCHAR Version;
UCHAR Channel;
UCHAR Level;
UCHAR Opcode;
USHORT Task;
ULONGLONG Keyword;
} EVENT_DESCRIPTOR, *PEVENT_DESCRIPTOR;

typedef struct _EVENT_DATA_DESCRIPTOR {
ULONGLONG Ptr;
ULONG Size;
union {
ULONG Reserved;
struct {
UCHAR Type;
UCHAR Reserved1;
USHORT Reserved2;
} DUMMYSTRUCTNAME;
} DUMMYUNIONNAME;
} EVENT_DATA_DESCRIPTOR, *PEVENT_DATA_DESCRIPTOR;



typedef void (WINAPI *PENABLECALLBACK)(
LPCGUID SourceId,
ULONG IsEnabled,
UCHAR Level,
ULONGLONG MatchAnyKeyword,
ULONGLONG MatchAllKeyword,
PEVENT_FILTER_DESCRIPTOR FilterData,
PVOID CallbackContext
);


ULONG
WINAPI
EventWrite(
REGHANDLE RegHandle,
PEVENT_DESCRIPTOR EventDescriptor,
ULONG UserDataCount,
PEVENT_DATA_DESCRIPTOR UserData
)
{
UNIMPLEMENTED;
return ERROR_SUCCESS;
};

ULONG
WINAPI
EventWriteTransfer(
REGHANDLE RegHandle,
PEVENT_DESCRIPTOR EventDescriptor,
LPCGUID ActivityId,
LPCGUID RelatedActivityId,
ULONG UserDataCount,
PEVENT_DATA_DESCRIPTOR UserData
)
{
UNIMPLEMENTED;
return ERROR_SUCCESS;
};

ULONG WINAPI EventRegister(
LPCGUID ProviderId,
PENABLECALLBACK EnableCallback,
PVOID CallbackContext,
REGHANDLE* RegHandle
)
{
UNIMPLEMENTED;
return ERROR_SUCCESS;
};

ULONG WINAPI EventUnregister(REGHANDLE RegHandle)
{
UNIMPLEMENTED;
return ERROR_SUCCESS;
};
23 changes: 17 additions & 6 deletions dll/win32/comctl32/imagelist.c
Expand Up @@ -80,9 +80,12 @@ struct _IMAGELIST
BOOL color_table_set;

LONG ref; /* reference count */

USHORT usVersion; /* hack for IL from stream. Keep version here */
};

#define IMAGELIST_MAGIC 0x53414D58
#define IMAGELIST_VERSION 0x101

/* Header used by ImageList_Read() and ImageList_Write() */
#include "pshpack2.h"
Expand Down Expand Up @@ -806,6 +809,7 @@ ImageList_Create (INT cx, INT cy, UINT flags,
himl->clrFg = CLR_DEFAULT;
himl->clrBk = CLR_NONE;
himl->color_table_set = FALSE;
himl->usVersion = 0;

/* initialize overlay mask indices */
for (nCount = 0; nCount < MAX_OVERLAYIMAGE; nCount++)
Expand Down Expand Up @@ -2375,7 +2379,9 @@ HIMAGELIST WINAPI ImageList_Read(IStream *pstm)
return NULL;
if (ilHead.usMagic != (('L' << 8) | 'I'))
return NULL;
if (ilHead.usVersion != 0x101) /* probably version? */
if (ilHead.usVersion != IMAGELIST_VERSION &&
ilHead.usVersion != 0x600 && /* XP/2003 version */
ilHead.usVersion != 0x620) /* Vista/7 version */
return NULL;

TRACE("cx %u, cy %u, flags 0x%04x, cCurImage %u, cMaxImage %u\n",
Expand All @@ -2385,6 +2391,9 @@ HIMAGELIST WINAPI ImageList_Read(IStream *pstm)
if (!himl)
return NULL;

/* keep version from stream */
himl->usVersion = ilHead.usVersion;

if (!(image_bits = read_bitmap(pstm, image_info)))
{
WARN("failed to read bitmap from stream\n");
Expand All @@ -2404,23 +2413,25 @@ HIMAGELIST WINAPI ImageList_Read(IStream *pstm)
{
DWORD *ptr = image_bits;
BYTE *mask_ptr = mask_bits;
int stride = himl->cy * image_info->bmiHeader.biWidth;
int stride = himl->cy * (ilHead.usVersion != IMAGELIST_VERSION ? himl->cx : image_info->bmiHeader.biWidth);
int image_step = ilHead.usVersion != IMAGELIST_VERSION ? 1 : TILE_COUNT;
int mask_step = ilHead.usVersion != IMAGELIST_VERSION ? 4 : 8;

if (image_info->bmiHeader.biHeight > 0) /* bottom-up */
{
ptr += image_info->bmiHeader.biHeight * image_info->bmiHeader.biWidth - stride;
mask_ptr += (image_info->bmiHeader.biHeight * image_info->bmiHeader.biWidth - stride) / 8;
mask_ptr += (image_info->bmiHeader.biHeight * image_info->bmiHeader.biWidth - stride) / mask_step;
stride = -stride;
image_info->bmiHeader.biHeight = himl->cy;
}
else image_info->bmiHeader.biHeight = -himl->cy;

for (i = 0; i < ilHead.cCurImage; i += TILE_COUNT)
for (i = 0; i < ilHead.cCurImage; i += image_step)
{
add_dib_bits( himl, i, min( ilHead.cCurImage - i, TILE_COUNT ),
add_dib_bits( himl, i, min( ilHead.cCurImage - i, image_step ),
himl->cx, himl->cy, image_info, mask_info, ptr, mask_ptr );
ptr += stride;
mask_ptr += stride / 8;
mask_ptr += stride / mask_step;
}
}
else
Expand Down
11 changes: 5 additions & 6 deletions dll/win32/comctl32/status.c
Expand Up @@ -291,7 +291,8 @@ STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc)

SelectObject (hdc, hOldFont);

if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
if ((GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
&& !(GetWindowLongW (infoPtr->Notify, GWL_STYLE) & WS_MAXIMIZE))
STATUSBAR_DrawSizeGrip (theme, hdc, &rect);

return 0;
Expand Down Expand Up @@ -1004,7 +1005,8 @@ STATUSBAR_WMGetText (const STATUS_INFO *infoPtr, INT size, LPWSTR buf)
static BOOL
STATUSBAR_WMNCHitTest (const STATUS_INFO *infoPtr, INT x, INT y)
{
if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP) {
if ((GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
&& !(GetWindowLongW (infoPtr->Notify, GWL_STYLE) & WS_MAXIMIZE)) {
RECT rect;
POINT pt;

Expand All @@ -1014,10 +1016,7 @@ STATUSBAR_WMNCHitTest (const STATUS_INFO *infoPtr, INT x, INT y)
pt.y = y;
ScreenToClient (infoPtr->Self, &pt);

rect.left = rect.right - 13;
rect.top += 2;

if (PtInRect (&rect, pt))
if (pt.x >= rect.right - GetSystemMetrics(SM_CXVSCROLL))
{
if (GetWindowLongW( infoPtr->Self, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) return HTBOTTOMLEFT;
else return HTBOTTOMRIGHT;
Expand Down
2 changes: 1 addition & 1 deletion dll/win32/kernel32/CMakeLists.txt
Expand Up @@ -112,7 +112,7 @@ set_subsystem(kernel32 console)
################# END HACK #################

target_link_libraries(kernel32 wine chkstk ${PSEH_LIB})
add_importlibs(kernel32 ntdll)
add_importlibs(kernel32 ntdll ntdll_vista)
add_pch(kernel32 k32.h SOURCE)
add_dependencies(kernel32 psdk errcodes asm)
add_cd_file(TARGET kernel32 DESTINATION reactos/system32 FOR all)
2 changes: 1 addition & 1 deletion dll/win32/kernel32/client/console/vista.c
Expand Up @@ -16,7 +16,7 @@

/* PUBLIC FUNCTIONS ***********************************************************/

#if _WIN32_WINNT >= 0x600
#if _WIN32_WINNT >= 0x500

/*
* @implemented
Expand Down
21 changes: 21 additions & 0 deletions dll/win32/kernel32/client/heapmem.c
Expand Up @@ -1365,6 +1365,27 @@ GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer)
}
}

/***********************************************************************
* GetPhysicallyInstalledSystemMemory (KERNEL32.@)
*/
BOOL WINAPI GetPhysicallyInstalledSystemMemory(ULONGLONG *total_memory)
{
MEMORYSTATUSEX memstatus;

DPRINT1("stub: %p\n", total_memory);

if (!total_memory)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}

memstatus.dwLength = sizeof(memstatus);
GlobalMemoryStatusEx(&memstatus);
*total_memory = memstatus.ullTotalPhys / 1024;
return TRUE;
}

/*
* @implemented
*/
Expand Down
2 changes: 1 addition & 1 deletion dll/win32/kernel32/client/job.c
Expand Up @@ -39,7 +39,7 @@ CreateJobObjectW(IN LPSECURITY_ATTRIBUTES lpJobAttributes,
IN LPCWSTR lpName)
{
/* Create the NT object */
CreateNtObjectFromWin32Api(JobObject, JobObject, JOB_OBJECT, lpJobAttributes, lpName);
CreateNtObjectFromWin32Api(JobObject, JobObject, JOB_OBJECT_ALL_ACCESS, lpJobAttributes, lpName);
}

/*
Expand Down

0 comments on commit 6d59809

Please sign in to comment.