[KERNEL32]

- Introduce kernel32_vista.dll, aiming at adding implementation of vista+ routines (for wine modules) without screwing kernel32 export list.
[MSI][PDH][SNMPAPI]
 - Link to kernel32_vista

svn path=/trunk/; revision=64282
This commit is contained in:
Jérôme Gardou 2014-09-25 18:25:47 +00:00
parent 9d617372d5
commit bb26155bdd
9 changed files with 80 additions and 2 deletions

View file

@ -71,6 +71,7 @@ add_subdirectory(itss)
add_subdirectory(jscript)
add_subdirectory(jsproxy)
add_subdirectory(kernel32)
add_subdirectory(kernel32_vista)
add_subdirectory(loadperf)
add_subdirectory(localspl)
add_subdirectory(localui)

View file

@ -0,0 +1,24 @@
add_definitions(-D_KERNEL32_)
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
spec2def(kernel32_vista.dll kernel32_vista.spec ADD_IMPORTLIB)
list(APPEND SOURCE
DllMain.c
GetTickCount64.c
)
add_library(kernel32_vista SHARED
${SOURCE}
${CMAKE_CURRENT_BINARY_DIR}/kernel32_vista.def
)
set_module_type(kernel32_vista win32dll HOTPATCHABLE ENTRYPOINT DllMain 12)
add_importlibs(kernel32_vista kernel32)
add_dependencies(kernel32_vista psdk)
add_cd_file(TARGET kernel32_vista DESTINATION reactos/system32 FOR all)

View file

@ -0,0 +1,14 @@
#include "k32_vista.h"
BOOL
WINAPI
DllMain(HANDLE hDll,
DWORD dwReason,
LPVOID lpReserved)
{
/* For now, there isn't much to do */
if (dwReason == DLL_PROCESS_ATTACH)
DisableThreadLibraryCalls(hDll);
return TRUE;
}

View file

@ -0,0 +1,25 @@
#include "k32_vista.h"
/*
* @implemented
*/
ULONGLONG
WINAPI
GetTickCount64(VOID)
{
ULARGE_INTEGER TickCount;
while (TRUE)
{
TickCount.HighPart = (ULONG)SharedUserData->TickCount.High1Time;
TickCount.LowPart = SharedUserData->TickCount.LowPart;
if (TickCount.HighPart == (ULONG)SharedUserData->TickCount.High2Time) break;
YieldProcessor();
}
return (UInt32x32To64(TickCount.LowPart, SharedUserData->TickCountMultiplier) >> 24) +
(UInt32x32To64(TickCount.HighPart, SharedUserData->TickCountMultiplier) << 8);
}

View file

@ -0,0 +1,11 @@
#pragma once
/* PSDK/NDK Headers */
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <ndk/kefuncs.h>
#include <ndk/psfuncs.h>

View file

@ -0,0 +1,2 @@
@ stdcall -ret64 GetTickCount64(void)

View file

@ -83,6 +83,7 @@ add_importlibs(msi
#fixme : should be in delayed imports
imagehlp
msvcrt
kernel32_vista
kernel32
ntdll)

View file

@ -14,5 +14,5 @@ list(APPEND SOURCE
add_library(pdh SHARED ${SOURCE})
set_module_type(pdh win32dll)
target_link_libraries(pdh wine)
add_importlibs(pdh msvcrt kernel32 ntdll)
add_importlibs(pdh msvcrt kernel32_vista kernel32 ntdll)
add_cd_file(TARGET pdh DESTINATION reactos/system32 FOR all)

View file

@ -14,5 +14,5 @@ list(APPEND SOURCE
add_library(snmpapi SHARED ${SOURCE} snmpapi.rc)
set_module_type(snmpapi win32dll)
target_link_libraries(snmpapi wine)
add_importlibs(snmpapi msvcrt kernel32 ntdll)
add_importlibs(snmpapi msvcrt kernel32_vista kernel32 ntdll)
add_cd_file(TARGET snmpapi DESTINATION reactos/system32 FOR all)