mirror of
https://github.com/UzixLS/KernelEx.git
synced 2025-07-19 07:21:20 +03:00
import KernelEx-4.5-RC1
This commit is contained in:
@ -63,6 +63,8 @@ static const apilib_named_api advapi32_named_apis[] =
|
||||
DECL_API("EnumServicesStatusExW", EnumServicesStatusExW_stub),
|
||||
DECL_API("EqualPrefixSid", EqualPrefixSid_new),
|
||||
DECL_API("EqualSid", EqualSid_new),
|
||||
DECL_API("FileEncryptionStatusA", FileEncryptionStatusA_stub),
|
||||
DECL_API("FileEncryptionStatusW", FileEncryptionStatusW_stub),
|
||||
DECL_API("FreeSid", FreeSid_new),
|
||||
DECL_API("GetAce", GetAce_new),
|
||||
DECL_API("GetFileSecurityA", GetFileSecurityA_new),
|
||||
|
@ -61,6 +61,8 @@ STUB EnumServicesStatusExW_stub;
|
||||
STUB CreateProcessWithLogonW_stub;
|
||||
STUB InitiateSystemShutdownExA_stub;
|
||||
STUB InitiateSystemShutdownExW_stub;
|
||||
STUB FileEncryptionStatusA_stub;
|
||||
STUB FileEncryptionStatusW_stub;
|
||||
BOOL WINAPI OpenProcessToken_new(HANDLE ProcessHandle, DWORD DesiredAccess, HANDLE *TokenHandle);
|
||||
BOOL WINAPI OpenThreadToken_new(HANDLE ThreadHandle, DWORD DesiredAccess, BOOL OpenAsSelf, HANDLE *TokenHandle);
|
||||
BOOL WINAPI DuplicateTokenEx_new(HANDLE ExistingTokenHandle, DWORD dwDesiredAccess, LPSECURITY_ATTRIBUTES lpTokenAttributes, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, TOKEN_TYPE TokenType, PHANDLE DuplicateTokenHandle);
|
||||
|
@ -55,3 +55,7 @@ UNIMPL_FUNC(EnumServicesStatusExW, 10);
|
||||
UNIMPL_FUNC(CreateProcessWithLogonW, 11);
|
||||
UNIMPL_FUNC(InitiateSystemShutdownExA, 6);
|
||||
UNIMPL_FUNC(InitiateSystemShutdownExW, 6);
|
||||
|
||||
|
||||
UNIMPL_FUNC(FileEncryptionStatusA, 2);
|
||||
UNIMPL_FUNC(FileEncryptionStatusW, 2);
|
||||
|
@ -152,6 +152,17 @@ DWORD WINAPI GetObjectType_fix( HGDIOBJ hgdiobj )
|
||||
return result;
|
||||
}
|
||||
|
||||
__declspec(naked)
|
||||
WORD GetCurrentTDB()
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov ax, fs:[0Ch]
|
||||
movzx eax, ax
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
/* MAKE_EXPORT DeleteObject_fix=DeleteObject */
|
||||
BOOL WINAPI DeleteObject_fix( HGDIOBJ hObject )
|
||||
{
|
||||
@ -159,7 +170,7 @@ BOOL WINAPI DeleteObject_fix( HGDIOBJ hObject )
|
||||
PGDIOBJ16 obj = GetGDIObjectPtr( hObject );
|
||||
if ( !obj || !SwitchGDIObjectType(obj) ) return FALSE;
|
||||
DWORD violated = 0;
|
||||
if ( obj->wOwner ) //not system objects
|
||||
if ( obj->wOwner == GetCurrentTDB() ) //not system or foreign objects
|
||||
{
|
||||
if (obj->wType == GDI_TYPE_FONT)
|
||||
{
|
||||
|
153
apilibs/kexbases/Kernel32/CompletionPorts.c
Executable file
153
apilibs/kexbases/Kernel32/CompletionPorts.c
Executable file
@ -0,0 +1,153 @@
|
||||
/*
|
||||
* KernelEx
|
||||
* Copyright (C) 2010, Tihiy
|
||||
*
|
||||
* This file is part of KernelEx source code.
|
||||
*
|
||||
* KernelEx is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* KernelEx is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Make; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "kexcoresdk.h"
|
||||
|
||||
/*
|
||||
* Note that only get-post functionality is rougly simulated;
|
||||
* no actual I/O completion notification can be done.
|
||||
*
|
||||
* Also handles don't get proper cleanup!
|
||||
*/
|
||||
|
||||
#define PORT_SIGNATURE 0xABADC0FE
|
||||
#define MAX_QUEUES 200
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwBytes;
|
||||
ULONG_PTR dwKey;
|
||||
LPOVERLAPPED lpOverlapped;
|
||||
} COMPLET_PACKET;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD signature;
|
||||
HANDLE hEvent;
|
||||
CRITICAL_SECTION cs;
|
||||
DWORD count;
|
||||
COMPLET_PACKET packets[MAX_QUEUES];
|
||||
} COMPLET_PORT, *PCOMPLET_PORT;
|
||||
|
||||
|
||||
/* MAKE_EXPORT CreateIoCompletionPort_new=CreateIoCompletionPort */
|
||||
HANDLE WINAPI CreateIoCompletionPort_new(
|
||||
HANDLE FileHandle, // handle to file
|
||||
HANDLE ExistingCompletionPort, // handle to I/O completion port
|
||||
ULONG_PTR CompletionKey, // completion key
|
||||
DWORD NumberOfConcurrentThreads // number of threads to execute concurrently
|
||||
)
|
||||
{
|
||||
//kexDebugPrint("CreateIoCompletionPort FileHandle %p Port %p Key %p Threads %d",FileHandle,ExistingCompletionPort,CompletionKey,NumberOfConcurrentThreads);
|
||||
if (FileHandle != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
DBGPRINTF(("CreateIoCompletionPort is used for real (file handle %p), not supported.\n",FileHandle));
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return NULL;
|
||||
}
|
||||
//go create a handle we will hack on
|
||||
HANDLE hFileMap = CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE,0,sizeof(COMPLET_PORT),NULL);
|
||||
if (hFileMap)
|
||||
{
|
||||
PCOMPLET_PORT port = (PCOMPLET_PORT)MapViewOfFile(hFileMap,FILE_MAP_ALL_ACCESS,0,0,0);
|
||||
port->signature = PORT_SIGNATURE;
|
||||
port->count = 0;
|
||||
port->hEvent = CreateEvent(NULL,FALSE,FALSE,NULL);
|
||||
InitializeCriticalSection( &port->cs );
|
||||
UnmapViewOfFile(port);
|
||||
}
|
||||
return hFileMap;
|
||||
}
|
||||
|
||||
|
||||
/* MAKE_EXPORT GetQueuedCompletionStatus_new=GetQueuedCompletionStatus */
|
||||
BOOL WINAPI GetQueuedCompletionStatus_new(
|
||||
HANDLE CompletionPort, // handle to completion port
|
||||
LPDWORD lpNumberOfBytes, // bytes transferred
|
||||
PULONG_PTR lpCompletionKey, // file completion key
|
||||
LPOVERLAPPED *lpOverlapped, // buffer
|
||||
DWORD dwMilliseconds // optional timeout value
|
||||
)
|
||||
{
|
||||
PCOMPLET_PORT port = (PCOMPLET_PORT)MapViewOfFile(CompletionPort,FILE_MAP_ALL_ACCESS,0,0,0);
|
||||
if (!port || port->signature != PORT_SIGNATURE || !lpOverlapped || !lpNumberOfBytes || !lpCompletionKey)
|
||||
{
|
||||
UnmapViewOfFile(port);
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
//kexDebugPrint("GetQueuedCompletionStatus waiting port %p for %d ms",port,dwMilliseconds);
|
||||
DWORD status = WaitForSingleObject(port->hEvent,dwMilliseconds);
|
||||
if (status != WAIT_OBJECT_0)
|
||||
{
|
||||
//kexDebugPrint("GetQueuedCompletionStatus waiting port %p timed up!",port);
|
||||
UnmapViewOfFile(port);
|
||||
*lpOverlapped = NULL;
|
||||
SetLastError(WAIT_TIMEOUT);
|
||||
return FALSE;
|
||||
}
|
||||
EnterCriticalSection(&port->cs);
|
||||
*lpNumberOfBytes = port->packets[0].dwBytes;
|
||||
*lpCompletionKey = port->packets[0].dwKey;
|
||||
*lpOverlapped = port->packets[0].lpOverlapped;
|
||||
port->count--;
|
||||
memmove(&port->packets[0],&port->packets[1],sizeof(COMPLET_PACKET)*port->count);
|
||||
if (port->count > 0) SetEvent(port->hEvent);
|
||||
LeaveCriticalSection(&port->cs);
|
||||
UnmapViewOfFile(port);
|
||||
//kexDebugPrint("GetQueuedCompletionStatus dequeued from port %p: %p %p %p",port,*lpNumberOfBytes,*lpCompletionKey,*lpOverlapped);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* MAKE_EXPORT PostQueuedCompletionStatus_new=PostQueuedCompletionStatus */
|
||||
BOOL WINAPI PostQueuedCompletionStatus_new(
|
||||
HANDLE CompletionPort, // handle to an I/O completion port
|
||||
DWORD dwNumberOfBytesTransferred, // bytes transferred
|
||||
ULONG_PTR dwCompletionKey, // completion key
|
||||
LPOVERLAPPED lpOverlapped // overlapped buffer
|
||||
)
|
||||
{
|
||||
PCOMPLET_PORT port = (PCOMPLET_PORT)MapViewOfFile(CompletionPort,FILE_MAP_ALL_ACCESS,0,0,0);
|
||||
//kexDebugPrint("PostQueuedCompletionStatus queued from port %p: %p %p %p",port,dwNumberOfBytesTransferred,dwCompletionKey,lpOverlapped);
|
||||
if (!port || port->signature != PORT_SIGNATURE || !lpOverlapped)
|
||||
{
|
||||
UnmapViewOfFile(port);
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
BOOL ret = FALSE;
|
||||
EnterCriticalSection(&port->cs);
|
||||
if (port->count < MAX_QUEUES)
|
||||
{
|
||||
DWORD last = port->count;
|
||||
port->packets[last].dwBytes = dwNumberOfBytesTransferred;
|
||||
port->packets[last].dwKey = dwCompletionKey;
|
||||
port->packets[last].lpOverlapped = lpOverlapped;
|
||||
port->count++;
|
||||
SetEvent(port->hEvent);
|
||||
ret = TRUE;
|
||||
}
|
||||
LeaveCriticalSection(&port->cs);
|
||||
UnmapViewOfFile(port);
|
||||
return ret;
|
||||
}
|
||||
|
76
apilibs/kexbases/Kernel32/RtlCaptureContext.c
Executable file
76
apilibs/kexbases/Kernel32/RtlCaptureContext.c
Executable file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* KernelEx
|
||||
* Copyright (C) 2010, Xeno86
|
||||
*
|
||||
* This file is part of KernelEx source code.
|
||||
*
|
||||
* KernelEx is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* KernelEx is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Make; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#define CONTEXT_CONTEXTFLAGS 0x00
|
||||
#define CONTEXT_SEGGS 0x8C
|
||||
#define CONTEXT_SEGFS 0x90
|
||||
#define CONTEXT_SEGES 0x94
|
||||
#define CONTEXT_SEGDS 0x98
|
||||
#define CONTEXT_EDI 0x9C
|
||||
#define CONTEXT_ESI 0xA0
|
||||
#define CONTEXT_EBX 0xA4
|
||||
#define CONTEXT_EDX 0xA8
|
||||
#define CONTEXT_ECX 0xAC
|
||||
#define CONTEXT_EAX 0xB0
|
||||
#define CONTEXT_EBP 0xB4
|
||||
#define CONTEXT_EIP 0xB8
|
||||
#define CONTEXT_SEGCS 0xBC
|
||||
#define CONTEXT_EFLAGS 0xC0
|
||||
#define CONTEXT_ESP 0xC4
|
||||
#define CONTEXT_SEGSS 0xC8
|
||||
|
||||
#define CONTEXT_FULL 0x10007
|
||||
|
||||
#define WINAPI __stdcall
|
||||
|
||||
/* MAKE_EXPORT RtlCaptureContext_new=RtlCaptureContext */
|
||||
__declspec(naked)
|
||||
void WINAPI RtlCaptureContext_new(void* cr)
|
||||
{
|
||||
__asm {
|
||||
push ebx
|
||||
mov ebx, [esp+8]
|
||||
mov [ebx+CONTEXT_EAX], eax
|
||||
mov eax, [esp]
|
||||
mov [ebx+CONTEXT_EBX], eax
|
||||
mov [ebx+CONTEXT_ECX], ecx
|
||||
mov [ebx+CONTEXT_EDX], edx
|
||||
mov [ebx+CONTEXT_ESI], esi
|
||||
mov [ebx+CONTEXT_EDI], edi
|
||||
mov [ebx+CONTEXT_SEGCS], cs
|
||||
mov [ebx+CONTEXT_SEGDS], ds
|
||||
mov [ebx+CONTEXT_SEGES], es
|
||||
mov [ebx+CONTEXT_SEGFS], fs
|
||||
mov [ebx+CONTEXT_SEGGS], gs
|
||||
mov [ebx+CONTEXT_SEGSS], ss
|
||||
pushf
|
||||
pop [ebx+CONTEXT_EFLAGS]
|
||||
mov eax, [ebp]
|
||||
mov [ebx+CONTEXT_EBP], eax
|
||||
mov eax, [ebp+4]
|
||||
mov [ebx+CONTEXT_EIP], eax
|
||||
lea eax, [ebp+8]
|
||||
mov [ebx+CONTEXT_ESP], eax
|
||||
mov [ebx+CONTEXT_CONTEXTFLAGS], CONTEXT_FULL
|
||||
pop ebx
|
||||
ret 4
|
||||
}
|
||||
}
|
@ -59,6 +59,7 @@ static const apilib_named_api kernel32_named_apis[] =
|
||||
DECL_API("CreateFileW", CreateFileW_new),
|
||||
DECL_API("CreateHardLinkA", CreateHardLinkA_stub),
|
||||
DECL_API("CreateHardLinkW", CreateHardLinkW_stub),
|
||||
DECL_API("CreateIoCompletionPort", CreateIoCompletionPort_new),
|
||||
DECL_API("CreateJobObjectA", CreateJobObjectA_new),
|
||||
DECL_API("CreateJobObjectW", CreateJobObjectW_new),
|
||||
DECL_API("CreateThread", CreateThread_fix),
|
||||
@ -78,6 +79,8 @@ static const apilib_named_api kernel32_named_apis[] =
|
||||
DECL_API("FoldStringW", FoldStringW_new),
|
||||
DECL_API("FreeEnvironmentStringsW", FreeEnvironmentStringsW_new),
|
||||
DECL_API("GetAtomNameW", GetAtomNameW_new),
|
||||
DECL_API("GetComputerNameExA", GetComputerNameExA_stub),
|
||||
DECL_API("GetComputerNameExW", GetComputerNameExW_stub),
|
||||
DECL_API("GetConsoleWindow", GetConsoleWindow_new),
|
||||
DECL_API("GetCurrentDirectoryW", GetCurrentDirectoryW_new),
|
||||
DECL_API("GetDefaultCommConfigW", GetDefaultCommConfigW_new),
|
||||
@ -97,6 +100,7 @@ static const apilib_named_api kernel32_named_apis[] =
|
||||
DECL_API("GetModuleHandleW", GetModuleHandleW_new),
|
||||
DECL_API("GetNativeSystemInfo", GetSystemInfo),
|
||||
DECL_API("GetProcessIoCounters", GetProcessIoCounters_stub),
|
||||
DECL_API("GetQueuedCompletionStatus", GetQueuedCompletionStatus_new),
|
||||
DECL_API("GetShortPathNameW", GetShortPathNameW_new),
|
||||
DECL_API("GetStartupInfoW", GetStartupInfoW_new),
|
||||
DECL_API("GetStringTypeExW", GetStringTypeExW_new),
|
||||
@ -173,6 +177,7 @@ static const apilib_named_api kernel32_named_apis[] =
|
||||
DECL_API("OpenJobObjectW", OpenJobObjectW_new),
|
||||
DECL_API("OpenThread", OpenThread_new),
|
||||
DECL_API("OutputDebugStringW", OutputDebugStringW_new),
|
||||
DECL_API("PostQueuedCompletionStatus", PostQueuedCompletionStatus_new),
|
||||
DECL_API("Process32FirstW", Process32FirstW_new),
|
||||
DECL_API("Process32NextW", Process32NextW_new),
|
||||
DECL_API("ProcessIdToSessionId", ProcessIdToSessionId_new),
|
||||
@ -182,6 +187,7 @@ static const apilib_named_api kernel32_named_apis[] =
|
||||
DECL_API("ReplaceFileA", ReplaceFileA_stub),
|
||||
DECL_API("ReplaceFileW", ReplaceFileW_stub),
|
||||
DECL_API("RestoreLastError", SetLastError),
|
||||
DECL_API("RtlCaptureContext", RtlCaptureContext_new),
|
||||
DECL_API("RtlCaptureStackBackTrace", RtlCaptureStackBackTrace_stub),
|
||||
DECL_API("SearchPathW", SearchPathW_new),
|
||||
DECL_API("SetConsoleTitleW", SetConsoleTitleW_new),
|
||||
|
@ -29,6 +29,9 @@ BOOL init_kernel32();
|
||||
extern const apilib_api_table apitable_kernel32;
|
||||
|
||||
/*** AUTOGENERATED APILIST DECLARATIONS BEGIN ***/
|
||||
HANDLE WINAPI CreateIoCompletionPort_new(HANDLE FileHandle, HANDLE ExistingCompletionPort, ULONG_PTR CompletionKey, DWORD NumberOfConcurrentThreads);
|
||||
BOOL WINAPI GetQueuedCompletionStatus_new(HANDLE CompletionPort, LPDWORD lpNumberOfBytes, PULONG_PTR lpCompletionKey, LPOVERLAPPED *lpOverlapped, DWORD dwMilliseconds);
|
||||
BOOL WINAPI PostQueuedCompletionStatus_new(HANDLE CompletionPort, DWORD dwNumberOfBytesTransferred, ULONG_PTR dwCompletionKey, LPOVERLAPPED lpOverlapped);
|
||||
BOOL WINAPI CopyFileExA_new(LPCSTR lpExistingFileNameA, LPCSTR lpNewFileNameA, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags);
|
||||
HANDLE WINAPI CreateThread_fix(LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId);
|
||||
void WINAPI DeleteCriticalSection_new(PCRITICAL_SECTION lpCriticalSection);
|
||||
@ -67,6 +70,7 @@ BOOL WINAPI MoveFileWithProgressA_new(LPCSTR lpExistingFileName, LPCSTR lpNewFil
|
||||
HANDLE WINAPI OpenThread_new(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwThreadId);
|
||||
BOOL WINAPI ProcessIdToSessionId_new(DWORD dwProcessId, DWORD *pSessionId);
|
||||
DWORD WINAPI WTSGetActiveConsoleSessionId_new(void);
|
||||
void WINAPI RtlCaptureContext_new(void* cr);
|
||||
BOOL WINAPI SetFilePointerEx_new(HANDLE hFile, LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER lpNewFilePointer, DWORD dwMoveMethod);
|
||||
BOOL WINAPI TryEnterCriticalSection_new(CRITICAL_SECTION* cs);
|
||||
LPVOID WINAPI VirtualAllocEx_new(HANDLE hProcess, LPVOID lpAddress, DWORD dwSize, DWORD flAllocationType, DWORD flProtect);
|
||||
@ -80,6 +84,8 @@ STUB FindFirstFileExW_stub;
|
||||
STUB HeapSetInformation_stub;
|
||||
STUB GetProcessIoCounters_stub;
|
||||
STUB RtlCaptureStackBackTrace_stub;
|
||||
STUB GetComputerNameExA_stub;
|
||||
STUB GetComputerNameExW_stub;
|
||||
INT WINAPI CompareStringW_new(LCID lcid, DWORD style, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2);
|
||||
BOOL WINAPI GetStringTypeW_new(DWORD type, LPCWSTR src, INT count, LPWORD chartype);
|
||||
BOOL WINAPI GetStringTypeExW_new(LCID locale, DWORD type, LPCWSTR src, INT count, LPWORD chartype);
|
||||
|
@ -30,3 +30,5 @@ UNIMPL_FUNC(FindFirstFileExW, 6);
|
||||
UNIMPL_FUNC(HeapSetInformation, 4);
|
||||
UNIMPL_FUNC(GetProcessIoCounters, 2);
|
||||
UNIMPL_FUNC(RtlCaptureStackBackTrace, 4);
|
||||
UNIMPL_FUNC(GetComputerNameExA, 3);
|
||||
UNIMPL_FUNC(GetComputerNameExW, 3);
|
||||
|
@ -84,6 +84,7 @@ static const apilib_named_api user32_named_apis[] =
|
||||
DECL_API("DefDlgProcW", DefDlgProcW_NEW),
|
||||
DECL_API("DefFrameProcW", DefFrameProcW_NEW),
|
||||
DECL_API("DefMDIChildProcW", DefMDIChildProcW_NEW),
|
||||
DECL_API("DefRawInputProc", DefRawInputProc_stub),
|
||||
DECL_API("DefWindowProcW", DefWindowProcW_NEW),
|
||||
DECL_API("DeregisterShellHookWindow", IsWindow),
|
||||
DECL_API("DialogBoxIndirectParamW", DialogBoxIndirectParamW_NEW),
|
||||
@ -103,6 +104,12 @@ static const apilib_named_api user32_named_apis[] =
|
||||
DECL_API("GetMessageW", GetMessageW_NEW),
|
||||
DECL_API("GetMouseMovePointsEx", GetMouseMovePointsEx_98),
|
||||
DECL_API("GetNextDlgTabItem", GetNextDlgTabItem_fix),
|
||||
DECL_API("GetRawInputBuffer", GetRawInputBuffer_stub),
|
||||
DECL_API("GetRawInputData", GetRawInputData_stub),
|
||||
DECL_API("GetRawInputDeviceInfoA", GetRawInputDeviceInfoA_stub),
|
||||
DECL_API("GetRawInputDeviceInfoW", GetRawInputDeviceInfoW_stub),
|
||||
DECL_API("GetRawInputDeviceList", GetRawInputDeviceList_stub),
|
||||
DECL_API("GetRegisteredRawInputDevices", GetRegisteredRawInputDevices_stub),
|
||||
DECL_API("GetWindowLongA", GetWindowLongA_NEW),
|
||||
DECL_API("GetWindowLongW", GetWindowLongW_NEW),
|
||||
DECL_API("GetWindowTextLengthW", GetWindowTextLengthW_NEW),
|
||||
@ -125,10 +132,12 @@ static const apilib_named_api user32_named_apis[] =
|
||||
DECL_API("PeekMessageW", PeekMessageW_NEW),
|
||||
DECL_API("PostMessageW", PostMessageW_NEW),
|
||||
DECL_API("PostThreadMessageW", PostThreadMessageW_NEW),
|
||||
DECL_API("PrintWindow", PrintWindow_stub),
|
||||
DECL_API("RealGetWindowClassA", RealGetWindowClass),
|
||||
DECL_API("RealGetWindowClassW", RealGetWindowClassW_new),
|
||||
DECL_API("RegisterClassExW", RegisterClassExW_NEW),
|
||||
DECL_API("RegisterClassW", RegisterClassW_NEW),
|
||||
DECL_API("RegisterRawInputDevices", RegisterRawInputDevices_stub),
|
||||
DECL_API("RegisterShellHookWindow", IsWindow),
|
||||
DECL_API("SendDlgItemMessageW", SendDlgItemMessageW_NEW),
|
||||
DECL_API("SendMessageA", SendMessageA_fix),
|
||||
|
@ -60,6 +60,15 @@ UINT WINAPI MapVirtualKeyExA_new(UINT uCode, UINT uMapType, HKL dwhkl);
|
||||
LRESULT WINAPI SendMessageA_fix(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
BOOL WINAPI UpdateLayeredWindow_new(HWND hwnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags);
|
||||
STUB SetLayeredWindowAttributes_stub;
|
||||
STUB DefRawInputProc_stub;
|
||||
STUB GetRawInputBuffer_stub;
|
||||
STUB GetRawInputData_stub;
|
||||
STUB GetRawInputDeviceList_stub;
|
||||
STUB GetRawInputDeviceInfoA_stub;
|
||||
STUB GetRawInputDeviceInfoW_stub;
|
||||
STUB GetRegisteredRawInputDevices_stub;
|
||||
STUB RegisterRawInputDevices_stub;
|
||||
STUB PrintWindow_stub;
|
||||
LPWSTR WINAPI CharNextExW_new(WORD codepage, LPCWSTR ptr, DWORD flags);
|
||||
LPWSTR WINAPI CharNextW_new(LPCWSTR x);
|
||||
LPSTR WINAPI CharPrevExW_new(WORD codepage, LPCWSTR start, LPCWSTR ptr, DWORD flags);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* KernelEx
|
||||
* Copyright (C) 2008, Xeno86
|
||||
* Copyright (C) 2008-2010, Xeno86, Tihiy
|
||||
*
|
||||
* This file is part of KernelEx source code.
|
||||
*
|
||||
@ -22,3 +22,14 @@
|
||||
#include "common.h"
|
||||
|
||||
UNIMPL_FUNC(SetLayeredWindowAttributes, 4);
|
||||
//raw input APIs
|
||||
UNIMPL_FUNC(DefRawInputProc, 3);
|
||||
UNIMPL_FUNC(GetRawInputBuffer, 3);
|
||||
UNIMPL_FUNC(GetRawInputData, 5);
|
||||
UNIMPL_FUNC(GetRawInputDeviceList, 3);
|
||||
UNIMPL_FUNC(GetRawInputDeviceInfoA, 4);
|
||||
UNIMPL_FUNC(GetRawInputDeviceInfoW, 4);
|
||||
UNIMPL_FUNC(GetRegisteredRawInputDevices, 3);
|
||||
UNIMPL_FUNC(RegisterRawInputDevices, 3);
|
||||
//
|
||||
UNIMPL_FUNC(PrintWindow, 3);
|
@ -109,6 +109,10 @@ SOURCE=.\Kernel32\_kernel32_stubs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Kernel32\CompletionPorts.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Kernel32\CopyFileEx.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -578,6 +582,10 @@ InputPath=.\kexbases.def
|
||||
|
||||
SOURCE=.\main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Kernel32\RtlCaptureContext.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
|
@ -22,18 +22,28 @@
|
||||
#include "common.h"
|
||||
#include "kexcoresdk.h"
|
||||
#include "_shell32_apilist.h"
|
||||
#include "../kernel32/_kernel32_apilist.h"
|
||||
|
||||
BOOL init_shell32()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* MAKE_EXPORT GetDiskFreeSpaceExA_fix=SHGetDiskFreeSpaceA
|
||||
* MAKE_EXPORT GetDiskFreeSpaceExA_fix=SHGetDiskFreeSpaceExA
|
||||
* MAKE_EXPORT GetDiskFreeSpaceExW_new=SHGetDiskFreeSpaceExW
|
||||
*/
|
||||
|
||||
static const apilib_named_api shell32_named_apis[] =
|
||||
{
|
||||
/*** AUTOGENERATED APILIST NAMED EXPORTS BEGIN ***/
|
||||
DECL_API("CommandLineToArgvW", CommandLineToArgvW_new),
|
||||
DECL_API("IsUserAnAdmin", IsUserAnAdmin_new),
|
||||
DECL_API("SHCreateShellItem", SHCreateShellItem_stub),
|
||||
DECL_API("SHGetDiskFreeSpaceA", GetDiskFreeSpaceExA_fix),
|
||||
DECL_API("SHGetDiskFreeSpaceExA", GetDiskFreeSpaceExA_fix),
|
||||
DECL_API("SHGetDiskFreeSpaceExW", GetDiskFreeSpaceExW_new),
|
||||
DECL_API("SHOpenFolderAndSelectItems", SHOpenFolderAndSelectItems_stub),
|
||||
/*** AUTOGENERATED APILIST NAMED EXPORTS END ***/
|
||||
};
|
||||
|
Reference in New Issue
Block a user