BlackWingCat's KDW API Wrapper & Tools

The wrapper, tools, and info you need to get games working

BlackWingCat's KDW API Wrapper & Tools

PostPosted by OldBoy2k » Mon Sep 21, 2009 10:59 am

Hi,

the KDW API Wrapper is a similar function API Wrapper started merely at the same time by the author BlackWingCat.
Main focus is on applications and the KDW pack also supplies tools for patching MSI archives,executables or libraries (dll) to make them compatible with Win2k.

Installation Notes:
Extract Wrapper package and run Kdllinst.exe.This is the main Wrapper-dll installer and configurator:
Important: Check "Ez KD Registry" and reboot.

Info: With disabling "saferfinddll" important dlls are excluded from KnownDLL.Alternatively you can also use the Excludefromknowndll.reg from the OCW Wrapper pack (Excludefromknowndll.reg only excludes Advapi32.dll,User32.dll,
Kernel32.dll,WS2_32.dll,WTSAPI32.dll and Ez KD Registry excludes these and some more libraries).Don't forget to reboot!

Make sure you copy the original kernel32.dll,shell32.dll and other required system files from your system32 directory and rename it to KERNEL2k.dll and SHELL2k.dll etc. together with the KDW associated files to the binaries directory.In principle with KDW,systemfiles number "32" has to be replaced by "2k".For example WS2_32.dll --> WS2_2k.dll !!!NOT WS232.dll or WS2k.dll!!!Exception: rpcrt4.dll -> rpc2k4.dll

Note (2): Neither KDW Uxtheme.dll,msvcrt.dw7 or 2kdll.dll need to be renamed or require any added ntdll.dll or msvcrt.dll Win2k system files when XP dll patched with fcwin like shown in fcwin usage 5!

Homepage:
The english homepage and function list can be found here:
click here: BlackWingCats KDW Wrapper homepage
click here: KDW Wrapper function list
click here: BlackWingCats list of backported games

Blog:
BlackWingCat recent software blog

MSFN Forum Windows 2000 threads:
msfn.org: FCWIN2K, XP API for Windows 2000 and auto executable patcher
msfn.org: Windows NT/2000/20003
msfn.org: .NET Framework 3.5 SP1 Win2k Project

or read his twitter blog (japanese):
BlackWingCat's twitter blog
OldBoy2k
 
Posts: 1351
Joined: Fri Feb 15, 2008 5:10 pm

fcwin Usage 1

PostPosted by BlackWingCat » Tue Oct 13, 2009 11:47 pm

1. If the following message appares '...exe is not a valid Win32 application'.
Image
a) Press reference or drag &drop target execute file.
b) Set Target OS(You want to run.)
c) Check Excecutable.
d) Press Rewrite.

finished.
Last edited by BlackWingCat on Tue Oct 13, 2009 11:55 pm, edited 1 time in total.
BlackWingCat
 
Posts: 75
Joined: Sat Mar 07, 2009 7:20 am
Location: Kanagawa, Japan

fcwin Usage 2

PostPosted by BlackWingCat » Tue Oct 13, 2009 11:54 pm

2. If kicked out Windows 2000, by msi file:
Image
a) Set Target msi file (Press reference or Drag &Drop)
b) Check 'Allow W2k', and 'Over write' (Check IE5 you need or Stand Alone).
c) Press Rewrite.

fcwin will patch msi file automatically.
BlackWingCat
 
Posts: 75
Joined: Sat Mar 07, 2009 7:20 am
Location: Kanagawa, Japan

fcwin Usage 3

PostPosted by BlackWingCat » Wed Oct 14, 2009 12:22 am

3. How to Force set Os version .

You can change OS version on WINDOWS API by strong Application Compatible mode.
This is hidden windows 2000 and XP Function !
Image
a) Select target executable file.
b) Select OS Version mode and Service Pack Number, You want. ( It can set also Win3.1 / Win 7 !)
c) Check any options if you want.
d) Press CompatSave.( If you want to run only once this file, press Run Compat)
BlackWingCat
 
Posts: 75
Joined: Sat Mar 07, 2009 7:20 am
Location: Kanagawa, Japan

fcwin Usage 4

PostPosted by BlackWingCat » Wed Oct 14, 2009 12:29 am

4. fcwin can generate IE User Agent.
Image
1. Check OS and Change os Version, if you want.
2. Change IE Version, if you want.
3. Press Rewrite.
4. Restart Internet Explorer, and its user agent is changed.
BlackWingCat
 
Posts: 75
Joined: Sat Mar 07, 2009 7:20 am
Location: Kanagawa, Japan

fcwin Usage 5

PostPosted by BlackWingCat » Tue Nov 03, 2009 3:51 am

5. a) fcwin can patch exe and dll to force import KDW wrapper files 2kdll or msvcrt.dw7
instead of Windows system ntdll.dll or msvcrt.dll.It has the function of a dll or exe import
replacer.

For example.Here the problematic library is the Vista only dwmapi.dll which links to msvcrt.dll and ntdll.dll
Image

We now patch the dwmapi.dll so it imports 2k.dll and msvcrt.dll
First load the dwmapi.dll and then check
ntdll.dll -> 2kdll.dll or/and msvcrt.dll -> msvcrt.dw7
Then press Rewrite.
Image
Drag & Drop support: You can also drag and drop the library or exe on top of fcwin.

b) Checking dwmapi.dll by loading with Dependency Walker:
Image
Here the problem is solved with dwmapi.dll and instead of ntdll.dll and msvcrt.dll
now the KDW system files 2k.dll and msvcrt.dw7 are imported.
BlackWingCat
 
Posts: 75
Joined: Sat Mar 07, 2009 7:20 am
Location: Kanagawa, Japan

Re: KDW API Wrapper & Tools (author BlackWingCat)

PostPosted by BlackWingCat » Thu Nov 12, 2009 11:33 am

I created Direct X 9.0c extension Package for Windows 2000

Enabled XACT, XAudio and XInput on windows 2000, and enhanced functions for 3D Games(Japanese).

Updated on Feb 2010.
BlackWingCat
 
Posts: 75
Joined: Sat Mar 07, 2009 7:20 am
Location: Kanagawa, Japan

About included files

PostPosted by BlackWingCat » Mon Feb 15, 2010 2:00 am

KDW Wrapper package content/explanation:

- Kdllinst.exe
This is the main Wrapper-dll installer and configurator:Check "Ez KD Registry" and reboot.
a) with disabling "saferfinddll" important dlls are excluded from KnownDLL.
b) with selecting "IE Reg checking" internet explorer libraries like shlwapi and some IE-dll are excluded from KnownDLL.

- fcwin2k.exe
MSI/EXE Force Convertor for Win2k (MSI,executables patch and compatibility tool ->see fcwin Usage 1-5)

- trans.reg

This file is the settings which KDW user32.dll extended options.

"ListviewShadow"=dword:00000001
If you set this value 1, then enable Transparent Desktop Text

"DesktopFGColor"=dword:ffffffff
If you set this value -1(ffffffff), then Desktop text color is set automatically.
and if you set Desktop text color with other value.


- USER32_NoPrintWindow.com

if you installed windowblinds4 and use kdw user32.dll, it makes system very slowly.
You copy this file in same folder, which KDW user32.dll and execute it,
patched user32.dll,which disabled PrintWindow and you can use windowblinds4 normally.


- VerWin.msi

this is Microsoft Windows Installer execute mode version checker.
You can use Following way.

* install KDW kernel32 and advapi32 in system with kdllinst.exe.
* reboot PC.
* check KDLLInst.exe , kernel32 and advapi status.
* start Windows Installer service.
* change OS Version emulation with fcwin.
* execute VerWin.msi


- VerTest.exe

You can check fcwin.exe's version emulate.
* drag and drop fcwin this file.
* change os mode.
* RunCompat or CompatSave and run it.
BlackWingCat
 
Posts: 75
Joined: Sat Mar 07, 2009 7:20 am
Location: Kanagawa, Japan

Re: BlackWingCat's KDW API Wrapper & Tools

PostPosted by OldBoy2k » Mon Jun 07, 2010 3:46 pm

Part 1: KnownDlls Wrapper Installer (kdllinst.exe) - XP Version Emulation

Alright,lets get to the good emulation stuff :).It took BlackWingCat some time to explain me the XP version emulation function in kdllinst.exe and i like to thank him for his patience.Lets see if i can recall everything correctly.

Note: Before we start,this technique will not work without the necessary emulation address-range of the setup executable!

1) download and extract the KDW archive to some folder.
2) copy the game or application with the setup executable to some TEMP folder (this will be the source folder)
3) open Kernel2k.tbl with notepad editor and add *XPS2-xxxx (emulation address) after the entry
*2KS4-007729 ;shlwapi.dll type3-A.Save file.Copy Kernel2k.tbl to the TEMP source folder.

Installer-emulation address table:
Code: Select all
InstallAware (for example: Stardock titles): *XPS2-58


4) start kdllinst.exe.This should look like this:
Image
5) select (1.) "EZ KD Registry" and reboot windows (only needed at the first time):
Image
6) choose (2.) "Ez Install" source directory which contains the setup executable you want to install.Then we need to select (3.) Kernel32 (KDW Kernel) so press the "long" line.Finaly we press (4.) Ez Install and the KDW files get installed into the source directory.
Image

7) close KnownDlls Wrapper Installer.
8) install the application or game.


Part 2: KnownDlls Wrapper Installer (kdllinst.exe) - finding the XP Version Emulation address

Note: This does not work with child-processes
1. run Dependency Walker and profile the setup or executable.
2. now we need to search the DW lower log window for suspicious KERNEL (or other system files) calls like:
IsWow64Process,GetNativeSystemInfo,VerifyVersionInfo,GetVersionEx,GetSystemInfo

For example the Impulse Installer calls IsWow64Process which is not present on Windows 2000 to terminate or continue the installation:

GetProcAddress(0x77E70000 [KERNEL32.DLL], "IsWow64Process") called from "IMPULSE_SETUP.EXE" at address 0x0058FD8F and returned NULL by thread 1. Error: Specified procedure not found (127)

3. check for related called address blocks like 0x00xxxxxx .Here in our example its 0x0058FD8F.The first two bytes after the 0x00 sequence reveal a possible emulation address which we need to try out.Repeat with other addresses until the correct emulation address is found.
4. open Kernel2k.tbl with notepad editor and add *XPS2-xx the emulation address after the entry
*2KS4-007729 ;shlwapi.dll type3-A.Save file.Copy Kernel2k.tbl to the TEMP source folder.

Uninstallation notes:
Uninstallation through the software environment does not work because of the launch condition check.Either use some third party software Uninstaller or look in the C:/Documents and Settings/All Users/Application Data/ for the setup folder containing the setup executable and repeat the above Kdllinst - procedure and run the setup executable to finaly uninstall the application ^^.

BR
OldBoy2k
OldBoy2k
 
Posts: 1351
Joined: Fri Feb 15, 2008 5:10 pm

Re: BlackWingCat's KDW API Wrapper & Tools

PostPosted by justjohnny » Tue Jun 08, 2010 1:26 pm

OldBoy2k wrote:KnownDlls Wrapper Installer (kdllinst.exe) - XP Version Emulation:

Note: Before we start,this technique will not work without the necessary emulation address-range of the setup executable!

3) open Kernel2k.tbl with notepad editor and add *XPS2-xxxx (emulation address) after the entry
*2KS4-007729 ;shlwapi.dll type3-A.Save file.Copy Kernel2k.tbl to the TEMP source folder.


Can you please post a tutorial for locating the emulation address-range?
justjohnny
 
Posts: 217
Joined: Mon Apr 12, 2010 7:25 am

Re: BlackWingCat's KDW API Wrapper & Tools

PostPosted by OldBoy2k » Tue Jun 08, 2010 7:34 pm

There is no straight foward tutorial but maybe we can come up with some tool to spot the emulation address.I will discuss it with BlackWingCat and OldCigarette.Please be patient.

BR
OldBoy2k
OldBoy2k
 
Posts: 1351
Joined: Fri Feb 15, 2008 5:10 pm

Re: BlackWingCat's KDW API Wrapper & Tools

PostPosted by OldBoy2k » Mon Jun 14, 2010 10:23 am

KnownDlls Wrapper Installer (kdllinst.exe) - Dynamic Install:

Purpose: Fixing missing exports
Example: Demo Setup (Installer)

Missing Exports:
SHLWAPI.dll - SHRegGetValueW

There are two ways to install the demo and fix the missing export.One way, which is already discussed here (Win2kgaming: Advanced Fix Guide) to exclude SHLWAPI.dll from ExcludeFromKnownDLL session list in the registry.The other way is to use KDW Dynamic Install:

1) the demo setup does not start because of a missing export in SHLWAPI.dll:
Image

2) start fcwin (KDW Wrapper pack) and open the setup (1.),select ShlwaXP,checksum,executable (2.) and press rewrite (3.):
Image
Then close fcwin.When you've loaded libraries,only check CheckSUM.

3) start kdllinst.exe (KDW Wrapper pack), select setup directory (1.),press Shlwapi (2.) and press DynamicInstall (3.):
Image
Then close kdllinst.

4) the missing export is fixed and we can install the demo:
Image

Of course,this method also works for all the other listed system files and for executables in general.

BR
OldBoy2k
OldBoy2k
 
Posts: 1351
Joined: Fri Feb 15, 2008 5:10 pm

PE Maker Relased

PostPosted by BlackWingCat » Fri Feb 18, 2011 3:25 am

PE Maker:
Image

This tool can change base address, expand section, and add import functions etc.
You can download from my blog
KernelEx for Windows 2000 is based on This technology.

17th Feb 2011, v0.52 available.
PE Maker
BlackWingCat
 
Posts: 75
Joined: Sat Mar 07, 2009 7:20 am
Location: Kanagawa, Japan

Re: BlackWingCat's KDW API Wrapper & Tools

PostPosted by BlackWingCat » Wed Feb 15, 2012 12:11 am

Hi.

17th February is Windows 2000's 12th anniversary !

I inform KDW's use32.dll problem was resolved since v0.96g. :)
BlackWingCat
 
Posts: 75
Joined: Sat Mar 07, 2009 7:20 am
Location: Kanagawa, Japan


Return to Tools & Info

Who is online

Users browsing this forum: No registered users and 0 guests

cron