- 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
add_subdirectory(jscript)
add_subdirectory(jsproxy)
add_subdirectory(kernel32)
+add_subdirectory(kernel32_vista)
add_subdirectory(loadperf)
add_subdirectory(localspl)
add_subdirectory(localui)
--- /dev/null
+
+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)
--- /dev/null
+
+#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;
+}
--- /dev/null
+
+#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);
+}
--- /dev/null
+
+#pragma once
+
+/* PSDK/NDK Headers */
+#define WIN32_NO_STATUS
+#include <windef.h>
+#include <winbase.h>
+
+#include <ndk/kefuncs.h>
+#include <ndk/psfuncs.h>
+
--- /dev/null
+
+@ stdcall -ret64 GetTickCount64(void)
#fixme : should be in delayed imports
imagehlp
msvcrt
+ kernel32_vista
kernel32
ntdll)
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)
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)