IPB

Google Frontpage Forums Unattended CD/DVD Guide
2 Pages V   1 2 >  
Reply to this topicStart new topic
> KernelEx for 2000?
jim2029
post Feb 28 2008, 05:54 PM
Post #1


Newbie


Group: Members
Posts: 40
Joined: 18-December 07
From: Michigan
Member No.: 167188
OS: 98SE
Country Flag


As I'm sure you all know, There is a project that ads support for windows XP only programs to Windows 98. Is there anything like this for 2000? Or does most of the XP only programs run in 2000 already?
Go to the top of the page
 
+Quote Post
cluberti
post Feb 28 2008, 06:23 PM
Post #2


Gustatus Similis Pullus
Group Icon

Group: Super Moderator
Posts: 5903
Joined: 9-September 01
From: United States
Member No.: 311
OS: Vista Ultimate x64
Country Flag


XP and 2000 share the same kernel (basically), with XP SP1 and SP2's additional security in XP. If you are talking about apps that don't need a version of DirectX that won't run on 2000, or don't need a specific XP API that doesn't exist on 2000, the app should run just fine on both platforms.
Go to the top of the page
 
+Quote Post
DosFreak
post Mar 3 2008, 06:34 AM
Post #3





Group: Members
Posts: 5
Joined: 16-June 07
Member No.: 143364
OS: none
Country Flag


Windows 2000 to Windows XP API Wrapper Pack
http://win2kgaming.siteburg.com/phpBB2/viewtopic.php?p=7

QUOTE
Windows 2000 XP API Wrapper Pack
--------------------------------
!!!!!!!DISCLAIMER!!!!!!!
THIS PACK IS NOT CREATED/SUPPORTED BY MICROSOFT IN ANYWAY.
WHEN MESSING WITH SYSTEM DLLS YOU CAN HOSE YOUR SYSTEM, READ WHAT THIS DOC SAYS AND FOLLOW IT'S
ADVICE. YOU SHOULD NOT DELETE ANYTHING FROM SYSTEM32, THESE WRAPPERS ARE NOT INTENDED TO BE PLACED
THERE! FOLLOW THIS AND YOU SHOULD BE SAFE. IF YOU ARE A DEV AND KNOW WHAT YOU ARE DOING YOU CAN
BUT DO NOT COME CRYING TO ME. NO WARRANTY, SEE THE END OF THIS FILE FOR MORE INFORMATION.

The Win2k wrapper pack is a collection of DLLs (dynamic loaded libraries) that
'wrap' the Windows API. These wrapper DLLs 'target' original copies of the system DLLs.
Most of these fixes were chosen to get newer games working on 2K. But they might be useful in
other situations as well.

This is NOT meant as a general XP compatibility kit to drop in your system32, while that does
work in MOST cases it is kind of dangerous and I don't recommend it. Rather these DLLs
should be placed along side the executable or in the start directory of the application.

In order to use these wrapper DLLs you MUST copy the original system DLLs somewhere in the
DLL search path with the TARGET name listed below. In my case I have a folder in my PATH
(WINXP_DLLS) that are unique to XP, ie no 2k equivalent. I place my TARGET DLLs here as well.

In some cases (kernel32.dll & user32.dll) the DLL search path must be modified due to 'KnownDLLs'
These KnownDLLs are only loaded from the system32, but this functionality can be disabled by
Regedt32. (*IMPORTANT regedit.exe won't work*) Simply add the DLLs to exclude from 'KnownDLLs' to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\ExcludeFromKnownDlls
this is a multiline value, so place a dll on each line.
Included in this pack should be a ExcludeFromKnownDlls.reg which will set this to kernel32.dll &
user32.dll. A reboot is needed for this to take effect. To see a list of KnownDLLs see
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs

For more info on DLL search paths see this awesome page
DLL Loading Rules in Win32 [http://home.att.net/~raffles1/older/dll_loading_rules_in_win32.htm]

======================
=Current DLL Wrappers=
======================

USER32.DLL TARGET=USER32_ORG.DLL
********************************
This DLL provides RAWINPUT for the mouse AND ONLY THE MOUSE. It uses DirectInput8 so only
use this DLL only if you need it (compatibility problems may arise otherwise.)
Tested on ETQW & Hellgate London, implementation is NOT XP compliant so milage may vary.

XP FUNCTIONS
RegisterRawInputDevices
GetRawInputData
GetLayeredWindowAttributes

KERNEL32.DLL TARGET=KERNEL32_ORG.DLL INI=win2k_xp_kernel32.ini
**************************************************************
This DLL use a ini file (win2k_xp_kernel32.ini) for advanced configuration. It should
be in the start directory of the application. This ini file is not required, default values will
be used as listed below.

*majVer, minVer, buildNum, majSP, minSP, and versionString are all overrides for GetVersion,
GetVersionExA, and GetVersionExW, if omitted the system value is returned. Using this with msiexec
will not result in anything good (tries to make a bunch of XP calls.)
*verifyVersion if set to 1 will force VerifyVersionInfo to return TRUE
*GetModuleOriginal if not set to 0 will return a HANDLE to the system kernel32.dll, this might be
useful if kernel32 has a new exports and this and this wrapper is out of date.
*geoNation & geoRegion specify return values for GetUserGeoID. If omitted defaults to
United States.
*SystemDirectory overrides the return value for GetSystemDirectoryA & GetSystemDirectoryW. If
omiited returns the system value.
*Load_ACLayers if not set to 0 will do LoadLibrary("aclayers.dll"), this is to get past securom,
which doesn't seem to approve of the wrapper. Make sure to place aclayers.dll somewhere in the
search path.
*RewriteExportTable if not set to 0 will do some export hacks for programs that think they know
how to read a PE. (Basically the RVA for the functions in the wrapper will point to KERNEL32_ORG)

Example win2k_xp_kernel32.ini (All default values on MY machine)
[win2k_xp_kernel32]
majVer=5
minVer=0
buildNum=2195
GetModuleOriginal=0
geoNation=244
geoRegion=244
geoISO2=US
geoISO3=USA
SystemDirectory=C:\WINNT\system32
Load_ACLayers=0
RewriteExportTable=0

XP FUNCTIONS
GetProcessId
GetThreadId
RestoreLastError
GetModuleHandleExW
GetModuleHandleExA
EncodePointer
DecodePointer
InterlockedPopEntrySList
InterlockedPushEntrySList
GetNativeSystemInfo
WTSGetActiveConsoleSessionId
GetUserGeoID
GetGeoInfoA
GetProcessHandleCount
CheckRemoteDebuggerPresent
GetNumaProcessorNode
GetNumaNodeProcessorMask
GetSystemTimes
GetSystemWow64DirectoryA
GetSystemWow64DirectoryW
AttachConsole

HOOKED FUNCTIONS
GetModuleHandleA
GetModuleHandleW
GetVersion
GetVersionExA
GetVersionExW
GetSystemDirectoryA
GetSystemDirectoryW
VerifyVersionInfoA
VerifyVersionInfoW
LoadLibraryA
LoadLibraryW
GetProcAddress

WTSAPI32.DLL TARGET=WTSAPI32_OLD.DLL
************************************
Provides two functions present in XP, but meaningless in 2K, always do nothing and return success.

XP FUNCTIONS
WTSRegisterSessionNotification
WTSUnRegisterSessionNotification

WS2_32.DLL TARGET=WS2_32_ORG.DLL
********************************
XP FUNCTIONS
getaddrinfo
freeaddrinfo
getnameinfo
FreeAddrInfoW

Tools for troubleshooting
-------------------------
Dependency Walker [http://www.dependencywalker.com/]
API Monitor [http://www.rohitab.com/apimonitor/]
APISpy32 [http://www.internals.com/]

Credits
-------
OldCigarette - coder of wrapper pack
OldBoy2k - old fashioned win2k user

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

END OF TERMS AND CONDITIONS

(yes I ripped that from the GPL)
Go to the top of the page
 
+Quote Post
OldCigarette
post Mar 3 2008, 12:02 PM
Post #4





Group: Members
Posts: 2
Joined: 3-March 08
Member No.: 180059
OS: 2000
Country Flag


Yep, my wrapper pack is similar to the KernelEx tool.

It is not system wide though, mostly because there are a few apps that are not compatible with it (found two so far both were from programs trying to read the PE on their own). You can install it system wide but it's not really setup for it like KernelEx.

One problem I've found is sometimes it would be nice for child processes to inherit the wrapper, I'm hoping to find an easy solution for this.

Cheers

Go to the top of the page
 
+Quote Post
win2000
post Jul 9 2008, 04:26 PM
Post #5


Newbie


Group: Members
Posts: 31
Joined: 31-May 08
From: Japan
Member No.: 194613
OS: 2000
Country Flag


I created the API extender for Windows 2000, "KDW".
I succeeded to run iTunes 7.6, QuickTime 7.50, Live Messenger, and foobar2000 9.5 etc on windows 2000.

KDW (Imperfect English site. tongue.gif )

I will create new topic here, after I finish up its manuals.
Go to the top of the page
 
+Quote Post
specialbao1
post Jul 9 2008, 10:42 PM
Post #6


Computer Technician
**

Group: Members
Posts: 135
Joined: 25-January 08
Member No.: 173354
OS: 2000
Country Flag


is it for japanese version only?
Go to the top of the page
 
+Quote Post
win2000
post Jul 10 2008, 08:06 AM
Post #7


Newbie


Group: Members
Posts: 31
Joined: 31-May 08
From: Japan
Member No.: 194613
OS: 2000
Country Flag


The application application which has belonged to KDW is bilingual English/Japanese. and there are a few English simple manuals.

I think the Dlls operate even with English environment and other languages, but it is lack of confirmation.
And I recommend the fact that it tests with virtual environment or using Ez mode, because the procedure has not been even.
sad.gif

QUOTE (specialbao1 @ Jul 10 2008, 01:42 PM) *
is it for japanese version only?

Go to the top of the page
 
+Quote Post
Tihiy
post Jul 11 2008, 05:37 AM
Post #8


Revolutions Pack Creator
******

Group: Members
Posts: 1443
Joined: 19-November 04
From: NeverSleep
Member No.: 36858
OS: none
Country Flag


win2000, can you publish source codes?
if not, can you write detailed changes?

That will be great support for KernelEx, too.
Go to the top of the page
 
+Quote Post
dirtwarrior
post Jul 11 2008, 02:49 PM
Post #9


OS modder
*******

Group: Members
Posts: 1980
Joined: 7-March 05
From: behind something
Member No.: 46675
Country Flag


Thanks for sharing.
Go to the top of the page
 
+Quote Post
win2000
post Jul 14 2008, 04:15 AM
Post #10


Newbie


Group: Members
Posts: 31
Joined: 31-May 08
From: Japan
Member No.: 194613
OS: 2000
Country Flag


I almost programed these API with inline Assembler, because I don't think source codes are showed in publish.
KDW is rename and replace Original Dll.
For example

Kernel32.dll -> kernel2k.dll
When certain program for XP calls kernel32.dll, KDW kernel32.dll,whiche hooked kernel2k.dll(original kernel) is called.


I added following function in wrapper DLLs.

advapi32.dll


CredDeleteA
CredDeleteW
CredFree
CredReadA
CredReadW
CredWriteA
CredWriteW
CredEnumerateA
CredEnumerateW
FlushTraceA
FlushTraceW
StopTraceA
StopTraceW
QueryTraceA
QueryTraceW
UpdateTraceA
UpdateTraceW
LsaLookupNames2
SaferCloseLevel
SaferComputeTokenFromLevel
SaferCreateLevel
SaferGetLevelInformation
SaferGetPolicyInformation
MD4Init
MD4Update
MD4Final
MD5Init
MD5Update
MD5Final
A_SHAFinal
A_SHAInit
A_SHAUpdate
Function036

kernel32.dll

GetModuleHandleExA
GetModuleHandleExW
GetSystemWow64DirectoryW
GetSystemWow64DirectoryA
GetProcessId
GetProcessHandleCount
AddVectoredExceptionHandler
RemoveVectoredExceptionHandler
GetNativeSystemInfo
AttachConsole
IsWow64Process
IsWow64Message
GetUserGeoID
EnumSystemGeoID
GetGeoInfoW
GetGeoInfoA
CheckRemoteDebuggerPresent
WTSGetActiveConsoleSessionId
InterlockedPopEntrySList
InterlockedPushEntrySList
InterlockedFlushSList
InitializeSListHead
QueryDepthSList
ReinitializeCriticalSection
SUnMapLS
SUnMapLS_IP_EBP_8
SUnMapLS_IP_EBP_12
SUnMapLS_IP_EBP_16
SUnMapLS_IP_EBP_20
SUnMapLS_IP_EBP_24
SUnMapLS_IP_EBP_28
SUnMapLS_IP_EBP_32
SUnMapLS_IP_EBP_36
SUnMapLS_IP_EBP_40
FT_Exit0
FT_Exit4
FT_Exit8
FT_Exit12
FT_Exit16
FT_Exit20
FT_Exit24
FT_Exit28
FT_Exit32
FT_Exit36
FT_Exit40
FT_Exit44
FT_Exit48
FT_Exit52
FT_Exit56
GetThreadIOPendingFlag
InterlockedPopEntrySList
InterlockedPushEntrySList
InterlockedFlushSList
InitializeSListHead
FirstEntrySList
QueryDepthSList
RtlCaptureStackBackTrace

rpcrt4.dll

RpcServerInqCallAttributesA
RpcServerInqCallAttributesW

user32.dll

IsWinEventHookInstalled
MessageBoxTimeoutA
MessageBoxTimeoutW
GetWindowRgnBox
GetLayeredWindowAttributes
IsServerSideWindow
IsWindowInDestroy
IsGUIThread
CalcMenuBar
PaintMenuBar
RegisterRawInputDevices
GetRawInputData

ws2_32.dll

GetNameInfoW
GetAddrInfoW
freeaddrinfo
getaddrinfo
getnameinfo
FreeAddrInfoW

shel32.dll

SHGetImageList
SHCreateShellItem
SHParseDisplayName
SHOpenFolderAndSelectItems
SHGetAttributesFromDataObject
SHGetShellStyleHInstance(copy shellstyle.dll in system32 to use)
SHGetFolderPathAndSubDirA
SHGetFolderPathAndSubDirW
IsUserAnAdmin and so on.
RestartDialogEx
SHChangeNotifyReceive
SHChangeNotification_Lock
SHChangeNotification_Unlock
WriteCabinetState
PathProcessCommand
ReadCabinetState
SHPropStgCreate
SHPropStgReadMultiple
SHPropStgWriteMultiple
CDefFolderMenu_Create
CDefFolderMenu_Create2
SHGetSetFolderCustomSettingsW
SHCreatePropertyBag
SHMultiFileProperties
SHAllocShared
SHLockShared
SHUnlockShared
SHFreeShared
RealDriveType
SHFlushSFCache
SHGetUnreadMailCountW
SHSetUnreadMailCountW

ole32.dll

CoRegisterInitializeSpy
CoRevokeInitializeSpy

shlwapi.dll

SHRegGetValueA
SHRegGetValueW
IsCharSpaceA
IsCharSpaceW
SHAllocShared
SHLockShared
SHUnlockShared
SHFreeShared
GetAcceptLanguagesA
GetAcceptLanguagesW
StrCmpICA
StrCmpICW
StrCmpCA
StrCmpCW
AssocGetPerceivedType


I only hokked following function in wrapper DLLs.

advapi32.dll

TraceMessage
TraceMessageVa
CredMarshalCredentialA
CredMarshalCredentialW
CredReadDomainCredentialsA
CredReadDomainCredentialsW
CredUnmarshalCredentialA
CredUnmarshalCredentialW
CredWriteDomainCredentialsA
CredWriteDomainCredentialsW
SaferRecordEventLogEntry
SaferSetLevelInformation
SaferSetPolicyInformation
SaferIdentifyLevel
SaferiChangeRegistryScope

kernel32.dll

RestoreLastError
RtlRestoreLastWin32Error
GetVolumePathNamesForVolumeNameA
GetVolumePathNamesForVolumeNameW
GetDllDirectoryA
GetDllDirectoryW
SetDllDirectoryA
SetDllDirectoryW
EncodePointer
DecodePointer
EncodeSystemPointer
DecodeSystemPointer
SetUserGeoID
ActivateActCtx
CreateActCtxW
CreateActCtxA
ReleaseActCtx
DeactivateActCtx
ZombifyActCtx
GetCurrentActCtx
AddRefActCtx
FindActCtxSectionString
FindActCtxSectionStringA
FindActCtxSectionStringW
MapLS
UnMapLS

rpcrt4.dll

I_RpcExceptionFilter
RpcServerUnregisterIfEx

user32.dll

PrintWindow
UnregisterUserApiHook
RegisterUserApiHook
DisableProcessWindowsGhosting

wtsapi32.dll

WTSQueryUserToken
WTSRegisterSessionNotification
WTSUnRegisterSessionNotification

shel32.dll

SHLimitInputEdit
SHSetLocalizedName
SHELL32.719
SHELL32.723
SHELL32.731
SHELL32.732
SHELL32.733
SHELL32.753
SHELL32.755
SHCreateQueryCancelAutoPlayMoniker

ole32.dll

CoRegisterInitializeSpy
CoRevokeInitializeSpy

esent.dll

JetBeginTransaction2
JetCreateInstance

And I expanded any functions.

QUOTE (Tihiy @ Jul 11 2008, 08:37 PM) *
win2000, can you publish source codes?
if not, can you write detailed changes?

That will be great support for KernelEx, too.

Go to the top of the page
 
+Quote Post
Mortagen
post Jul 29 2008, 09:32 PM
Post #11


Newbie


Group: Members
Posts: 24
Joined: 6-August 07
Member No.: 149482
OS: none
Country Flag


how do you add functions to a .dll ?
Go to the top of the page
 
+Quote Post
Targaff
post Jul 31 2008, 10:41 PM
Post #12


Junior
*

Group: Members
Posts: 80
Joined: 22-August 05
Member No.: 69830
Country Flag


Did anyone else actually try this yet? I gave it a whirl because I'm going to reinstall shortly anyhow, but upon restart the computer would reboot right at the point where it was supposed to switch to the login window, so I had to restore the backed up DLLs.
Go to the top of the page
 
+Quote Post
Dave-H
post Aug 1 2008, 03:29 AM
Post #13


Member
**

Group: Members
Posts: 115
Joined: 4-January 06
Member No.: 84253
Country Flag


QUOTE (Targaff @ Aug 1 2008, 05:41 AM) *
Did anyone else actually try this yet? I gave it a whirl because I'm going to reinstall shortly anyhow, but upon restart the computer would reboot right at the point where it was supposed to switch to the login window, so I had to restore the backed up DLLs.

I'm very interested in this too, and I'm going to try it out over the weekend.
I'll let you know if I hit similar problems!
I'm going to completely back up my Windows 2000 folder first.................
smile.gif
Go to the top of the page
 
+Quote Post
Dave-H
post Aug 1 2008, 03:31 PM
Post #14


Member
**

Group: Members
Posts: 115
Joined: 4-January 06
Member No.: 84253
Country Flag


Well, tried it tonight, and in fact it seemed to work fine.
Replaced all the system files with the new versions, and the system rebooted fine, with no BSOD.
How it got round the System File Protection is anyone's guess!

I did have two consequential problems though.
Firstly, I was immediately nagged by Windows Update to install the last cumulative security update for Internet Explorer. KDW had replaced some files such as SHLWAPI.DLL which are part of those IE updates.
As it was seen as an earlier version the update was flagged again.

Also, I have Norton Utilities (2002) installed, which includes a utility called "Norton Protected Recycle Bin".
I started getting error messages on boot-up that the Norton Protection service couldn't start because it couldn't determine the operating system version.
Another consequence of the system files replacement I assume.

The only reason I wanted this really was to install Quicktime 7.5.
In fact even with the new system files, and hacking the MSI file using the KDW utility (or indeed with Orca) it still wouldn't install, with an unspecified error.

I've decided to leave things as they are.
I was pleased to find that the KDW uninstall routine did seem to do its job, and restored all the system files so my system seems to be back to as it was before.
smile.gif
Go to the top of the page
 
+Quote Post
Th3_uN1Qu3
post Aug 1 2008, 05:15 PM
Post #15


Digital sinner
***

Group: Members
Posts: 430
Joined: 17-March 08
From: Bucharest
Member No.: 182383
OS: Vista Ultimate x64
Country Flag


Off topic, but get rid of anything with Norton in its name. Please. And why would you need a protected recycle bin? laugh.gif I don't even remember what the recycle bin is used for.
Go to the top of the page
 
+Quote Post
Dave-H
post Aug 2 2008, 12:07 PM
Post #16


Member
**

Group: Members
Posts: 115
Joined: 4-January 06
Member No.: 84253
Country Flag


QUOTE (Th3_uN1Qu3 @ Aug 2 2008, 12:15 AM) *
Off topic, but get rid of anything with Norton in its name. Please. And why would y