1
0
mirror of https://github.com/UzixLS/KernelEx.git synced 2025-07-18 23:11:19 +03:00

import KernelEx-4.0-Final

This commit is contained in:
UzixLS
2018-11-03 16:20:02 +03:00
parent 339353cce8
commit 30df122aba
339 changed files with 11011 additions and 1945 deletions

12
common/is_sorted.hpp Executable file → Normal file
View File

@ -1,9 +1,3 @@
template<typename FI>
inline bool is_sorted(FI begin, FI end)
{
return is_sorted_until(begin, end) == end;
}
template<typename FI>
FI is_sorted_until(FI begin, FI end)
{
@ -17,3 +11,9 @@ FI is_sorted_until(FI begin, FI end)
return end;
}
template<typename FI>
inline bool is_sorted(FI begin, FI end)
{
return ::is_sorted_until(begin, end) == end;
}

17
common/k32ord.def Normal file
View File

@ -0,0 +1,17 @@
LIBRARY KERNEL32.dll
EXPORTS
CommonUnimpStub @17 NONAME
VxDCall1 @1 NONAME
VxDCall2 @2 NONAME
VxDCall3 @3 NONAME
VxDCall4 @4 NONAME
VxDCall5 @5 NONAME
VxDCall6 @6 NONAME
VxDCall7 @7 NONAME
VxDCall8 @8 NONAME
_EnterSysLevel @97 NONAME
_LeaveSysLevel @98 NONAME
MakeCriticalSectionGlobal
MapSL
LoadLibrary16 @35 NONAME

69
common/k32ord.h Normal file
View File

@ -0,0 +1,69 @@
/*
* KernelEx
* Copyright (C) 2009, 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.
*
*/
#ifndef __K32ORD_H
#define __K32ORD_H
#include <windows.h>
#ifdef K32ORD_IMPLIB
#ifdef _MSC_VER
#pragma warning(disable:4716)
#endif
#define MAKE_HEADER(decl) \
__declspec(dllexport) decl {}
#else
#define MAKE_HEADER(decl) \
__declspec(dllimport) decl ;
#endif
#ifdef __cplusplus
extern "C" {
#endif
MAKE_HEADER(void __stdcall _EnterSysLevel(CRITICAL_SECTION* cs))
MAKE_HEADER(void __stdcall _LeaveSysLevel(CRITICAL_SECTION* cs))
MAKE_HEADER(ULONG __stdcall VxDCall1(ULONG p1))
MAKE_HEADER(ULONG __stdcall VxDCall2(ULONG p1, ULONG p2))
MAKE_HEADER(ULONG __stdcall VxDCall3(ULONG p1, ULONG p2, ULONG p3))
MAKE_HEADER(ULONG __stdcall VxDCall4(ULONG p1, ULONG p2, ULONG p3, ULONG p4))
MAKE_HEADER(ULONG __stdcall VxDCall5(ULONG p1, ULONG p2, ULONG p3, ULONG p4, ULONG p5))
MAKE_HEADER(ULONG __stdcall VxDCall6(ULONG p1, ULONG p2, ULONG p3, ULONG p4, ULONG p5, ULONG p6))
MAKE_HEADER(ULONG __stdcall VxDCall7(ULONG p1, ULONG p2, ULONG p3, ULONG p4, ULONG p5, ULONG p6, ULONG p7))
MAKE_HEADER(ULONG __stdcall VxDCall8(ULONG p1, ULONG p2, ULONG p3, ULONG p4, ULONG p5, ULONG p6, ULONG p7, ULONG p8))
MAKE_HEADER(void __stdcall MakeCriticalSectionGlobal(CRITICAL_SECTION* cs))
MAKE_HEADER(ULONG __stdcall CommonUnimpStub())
MAKE_HEADER(DWORD __stdcall MapSL(DWORD addr16))
MAKE_HEADER(DWORD __stdcall LoadLibrary16(LPSTR libname))
#ifdef __cplusplus
}
#endif
#endif

9
common/kexcoresdk.h Executable file → Normal file
View File

@ -106,6 +106,13 @@ typedef const apilib_api_table* (* fgat_t)();
_KEXCOREIMP unsigned long kexGetKEXVersion();
/** kexIsDebugCore - determine release/debug KernelEx Core version
*
* @return Zero if release Core, one if debug Core.
*/
_KEXCOREIMP int kexIsDebugCore();
/** kexDebugPrint - output debug information
*
* Parameters are compatible with printf command,
@ -169,7 +176,7 @@ _KEXCOREIMP void kexFlushAppSettings(void);
#ifdef __cplusplus
}; /* extern "C" */
} /* extern "C" */
#endif

0
common/pemanip.cpp Executable file → Normal file
View File

0
common/pemanip.h Executable file → Normal file
View File

12
common/sstring.hpp Executable file → Normal file
View File

@ -24,6 +24,7 @@
#include <string.h>
/** Simple string container class. */
class sstring
{
public:
@ -55,12 +56,21 @@ public:
return *this;
}
sstring& operator=(const char* src)
{
len = strlen(src);
delete [] storage;
storage = new char[len + 1];
strcpy(storage, src);
return *this;
}
bool operator<(const sstring& a) const
{
return strcmp(storage, a.storage) < 0;
}
const char* get() const
operator const char*() const
{
return storage;
}

30
common/version.h Normal file
View File

@ -0,0 +1,30 @@
/*
* KernelEx
* Copyright (C) 2009, 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.
*
*/
#ifndef __VERSION_H
#define __VERSION_H
#define VERSION_STR "4.0 Final"
#define VERSION_CODE 0x04000064
#define RCVERSION 4, 0, 10, 0
#define _RCVERSION_ "4, 0, 10, 0"
#endif