mirror of
https://github.com/reactos/reactos.git
synced 2025-04-15 01:47:30 +00:00
[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:
parent
9d617372d5
commit
bb26155bdd
9 changed files with 80 additions and 2 deletions
|
@ -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)
|
||||
|
|
24
reactos/dll/win32/kernel32_vista/CMakeLists.txt
Normal file
24
reactos/dll/win32/kernel32_vista/CMakeLists.txt
Normal 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)
|
14
reactos/dll/win32/kernel32_vista/DllMain.c
Normal file
14
reactos/dll/win32/kernel32_vista/DllMain.c
Normal 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;
|
||||
}
|
25
reactos/dll/win32/kernel32_vista/GetTickCount64.c
Normal file
25
reactos/dll/win32/kernel32_vista/GetTickCount64.c
Normal 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);
|
||||
}
|
11
reactos/dll/win32/kernel32_vista/k32_vista.h
Normal file
11
reactos/dll/win32/kernel32_vista/k32_vista.h
Normal 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>
|
||||
|
2
reactos/dll/win32/kernel32_vista/kernel32_vista.spec
Normal file
2
reactos/dll/win32/kernel32_vista/kernel32_vista.spec
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
@ stdcall -ret64 GetTickCount64(void)
|
|
@ -83,6 +83,7 @@ add_importlibs(msi
|
|||
#fixme : should be in delayed imports
|
||||
imagehlp
|
||||
msvcrt
|
||||
kernel32_vista
|
||||
kernel32
|
||||
ntdll)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue