diff --git a/Include/dxwnd.h b/Include/dxwnd.h index 0ab3f87..eb53cb4 100644 --- a/Include/dxwnd.h +++ b/Include/dxwnd.h @@ -39,7 +39,7 @@ #define SWITCHVIDEOMEMORY 0x04000000 // when VIDEO memory is over, switches to SYSTEM memory #define CLIENTREMAPPING 0x08000000 // hooks CLientToRect, RectToClient, GetClientRect, GetWinRect #define HANDLEALTF4 0x10000000 // forces quitting the program when receiving Alt-F4 key -#define LOCKWINPOS 0x20000000 // prevent the origram to change its own windows properties +#define LOCKWINPOS 0x20000000 // prevent the program to change its own windows properties #define HOOKCHILDWIN 0x40000000 // hook CHILD windows to alter placement coordinates (UNUSED) #define MESSAGEPROC 0x80000000 // process peek/get messages @@ -73,6 +73,7 @@ #define NOBANNER 0x04000000 // suppress fancy logo & banneer effects #define WINDOWIZE 0x08000000 // Run in a Window (default TRUE) #define LIMITRESOURCES 0x10000000 // Limit resources to fit an old program's expectations +#define STARTDEBUG 0x20000000 // Start in DEBUG mode // logging Tflags DWORD: #define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general @@ -141,7 +142,7 @@ int HookInit(TARGETMAP *, HWND); void *SetHook(void *, void *); void SetHook(void *, void *, void **, char *); void OutTrace(const char *, ...); -void *HookAPI(const char *, char *, void *, const char *, void *); +void *HookAPI(HMODULE, char *, void *, const char *, void *); void AdjustWindowFrame(HWND, DWORD, DWORD); LRESULT CALLBACK extWindowProc(HWND, UINT, WPARAM, LPARAM); diff --git a/build/dxwnd.dll b/build/dxwnd.dll index fb64dee..d77bdcb 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e57051bb941d5540bc3ff00785953fc614543989bd451522af2759f240fb2298 -size 297984 +oid sha256:9530b7fe842a87f99d093ae348d625f39f995d6c316d74a904f62991389ab035 +size 302592 diff --git a/build/dxwnd.exe b/build/dxwnd.exe index 908d25e..780e5d5 100644 --- a/build/dxwnd.exe +++ b/build/dxwnd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:deb192e6aa9d77b5a60a663c39fe0d39a6ca3c100179a9e0c71e6f11d85d18b4 -size 498688 +oid sha256:7d35bac3ab4fe4d695e7f1cc08777c28664740d8994a72c27b92898273434e4d +size 500736 diff --git a/build/dxwnd.ini b/build/dxwnd.ini new file mode 100644 index 0000000..86ae6f4 --- /dev/null +++ b/build/dxwnd.ini @@ -0,0 +1,4422 @@ +[target] +title0=1602 A.D. +path0=C:\Games\1602 A.D\1602.exe +module0= +ver0=0 +flag0=679608354 +flagg0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +title1=7th Legion +path1=D:\Games\7th_Legion\LEGION.EXE +module1= +ver1=0 +flag1=402669607 +flagg1=539056144 +tflag1=12 +initx1=0 +inity1=0 +minx1=0 +miny1=0 +maxx1=0 +maxy1=0 +posx1=50 +posy1=50 +sizx1=800 +sizy1=600 +title2=A10 Cuba +path2=D:\Games\A10\A10Cuba.exe +module2= +ver2=0 +flag2=34 +flagg2=0 +tflag2=0 +initx2=0 +inity2=0 +minx2=0 +miny2=0 +maxx2=0 +maxy2=0 +posx2=50 +posy2=50 +sizx2=800 +sizy2=600 +title3=Achtung Spitfire +path3=D:\Games\Achtung Spitfire\ASP95.EXE +module3= +ver3=0 +flag3=536870946 +flagg3=0 +tflag3=70 +initx3=0 +inity3=0 +minx3=0 +miny3=0 +maxx3=0 +maxy3=0 +posx3=50 +posy3=50 +sizx3=800 +sizy3=600 +title4=Actua Soccer 3 +path4=D:\Games\ActuaSoccer3\Soccer3.exe +module4= +ver4=0 +flag4=671088674 +flagg4=256 +tflag4=263 +initx4=0 +inity4=0 +minx4=0 +miny4=0 +maxx4=0 +maxy4=0 +posx4=50 +posy4=50 +sizx4=800 +sizy4=600 +title5=AfterLife +path5=d:\Games\ALIFE\ALIFE.EXE +module5= +ver5=1 +flag5=134217762 +flagg5=160 +tflag5=2 +initx5=0 +inity5=0 +minx5=0 +miny5=0 +maxx5=0 +maxy5=0 +posx5=50 +posy5=50 +sizx5=800 +sizy5=600 +title6=Age of Empires +path6=D:\Games\Age of Empires\EMPIRES.EXE +module6= +ver6=0 +flag6=402653219 +flagg6=69648 +tflag6=387 +initx6=0 +inity6=0 +minx6=0 +miny6=0 +maxx6=0 +maxy6=0 +posx6=50 +posy6=50 +sizx6=800 +sizy6=600 +title7=Age of Empires 2 +path7=D:\Games\Age of Empires 2\empires2.exe +module7= +ver7=0 +flag7=134217762 +flagg7=20480 +tflag7=0 +initx7=0 +inity7=0 +minx7=0 +miny7=0 +maxx7=0 +maxy7=0 +posx7=50 +posy7=50 +sizx7=800 +sizy7=600 +title8=Age of Empires the Rise of Rome +path8=D:\Games\Age of Empires\EMPIRESX.EXE +module8= +ver8=0 +flag8=134217762 +flagg8=81920 +tflag8=0 +initx8=0 +inity8=0 +minx8=0 +miny8=0 +maxx8=0 +maxy8=0 +posx8=50 +posy8=50 +sizx8=800 +sizy8=600 +title9=Age of Wonders +path9=D:\Games\Age of Wonders\AoW.exe +module9=VideoP.dpl vcl30.dpl +ver9=0 +flag9=545390594 +flagg9=17 +tflag9=387 +initx9=0 +inity9=0 +minx9=0 +miny9=0 +maxx9=0 +maxy9=0 +posx9=50 +posy9=50 +sizx9=800 +sizy9=600 +title10=Airline Tycoon Evolution +path10=D:\Games\Airline.Tycoon.Evolution\AT.EXE +module10= +ver10=0 +flag10=402653219 +flagg10=5242880 +tflag10=279 +initx10=0 +inity10=0 +minx10=0 +miny10=0 +maxx10=0 +maxy10=0 +posx10=50 +posy10=50 +sizx10=800 +sizy10=600 +title11=Alien Cabal 95 +path11=D:\Games\Alien_cabal\ACabal95.exe +module11= +ver11=0 +flag11=71303200 +flagg11=0 +tflag11=3 +initx11=0 +inity11=0 +minx11=0 +miny11=0 +maxx11=0 +maxy11=0 +posx11=50 +posy11=50 +sizx11=800 +sizy11=600 +title12=Alien vs. Predator +path12=C:\Games\Alien vs Predator\AvP.exe +module12= +ver12=0 +flag12=8224 +flagg12=0 +tflag12=130 +initx12=0 +inity12=0 +minx12=0 +miny12=0 +maxx12=0 +maxy12=0 +posx12=50 +posy12=50 +sizx12=800 +sizy12=600 +title13=Aliens Nations Demo +path13=C:\Games\aademo\Bin\AA.exe +module13= +ver13=0 +flag13=134217762 +flagg13=0 +tflag13=0 +initx13=0 +inity13=0 +minx13=0 +miny13=0 +maxx13=0 +maxy13=0 +posx13=0 +posy13=0 +sizx13=800 +sizy13=600 +title14=America +path14=D:\Games\America\america.exe +module14= +ver14=0 +flag14=134234150 +flagg14=16 +tflag14=0 +initx14=0 +inity14=0 +minx14=0 +miny14=0 +maxx14=0 +maxy14=0 +posx14=50 +posy14=50 +sizx14=800 +sizy14=600 +title15=American McGee's Alice Demo +path15=D:\Games\American McGee's Alice Demo\alice.exe +module15= +ver15=10 +flag15=268435458 +flagg15=131072 +tflag15=0 +initx15=0 +inity15=0 +minx15=0 +miny15=0 +maxx15=0 +maxy15=0 +posx15=50 +posy15=50 +sizx15=800 +sizy15=600 +title16=Ancient Conquest +path16=D:\Games\Ancient Conquest\ANCIENT.EXE +module16= +ver16=0 +flag16=142606370 +flagg16=1048576 +tflag16=258 +initx16=0 +inity16=0 +minx16=0 +miny16=0 +maxx16=0 +maxy16=0 +posx16=50 +posy16=50 +sizx16=800 +sizy16=600 +title17=Ancient Evil +path17=C:\Games\Ancient Evil\RPG.EXE +module17=DDW16.DLL +ver17=1 +flag17=-2013249497 +flagg17=0 +tflag17=2 +initx17=0 +inity17=0 +minx17=0 +miny17=0 +maxx17=0 +maxy17=0 +posx17=50 +posy17=50 +sizx17=800 +sizy17=600 +title18=Ancient Evil Demo +path18=C:\Games\Ancient Evil Curse of the Snake Cult\aecsc-demo.exe +module18= +ver18=1 +flag18=134242336 +flagg18=0 +tflag18=0 +initx18=0 +inity18=0 +minx18=0 +miny18=0 +maxx18=0 +maxy18=0 +posx18=50 +posy18=50 +sizx18=800 +sizy18=600 +title19=Armymen +path19=C:\Games\armymen\Armymen.exe +module19= +ver19=0 +flag19=134218274 +flagg19=1 +tflag19=0 +initx19=0 +inity19=0 +minx19=0 +miny19=0 +maxx19=0 +maxy19=0 +posx19=50 +posy19=50 +sizx19=800 +sizy19=600 +title20=ArmyMen 2 +path20=C:\Games\army2\ArmyMen2.exe +module20= +ver20=0 +flag20=402653730 +flagg20=0 +tflag20=0 +initx20=0 +inity20=0 +minx20=0 +miny20=0 +maxx20=0 +maxy20=0 +posx20=50 +posy20=50 +sizx20=800 +sizy20=600 +title21=Atomic Bomberman +path21=C:\Games\Atomic Bomberman\BM95.EXE +module21= +ver21=0 +flag21=2 +flagg21=0 +tflag21=0 +initx21=0 +inity21=0 +minx21=0 +miny21=0 +maxx21=0 +maxy21=0 +posx21=50 +posy21=50 +sizx21=800 +sizy21=600 +title22=Axis & Allies Iron Blitz Edition +path22=C:\Games\Axis & Allies Iron Blitz Edition\Axis & Allies\AxisAllies.exe +module22= +ver22=0 +flag22=-2147483614 +flagg22=0 +tflag22=0 +initx22=0 +inity22=0 +minx22=0 +miny22=0 +maxx22=0 +maxy22=0 +posx22=50 +posy22=50 +sizx22=800 +sizy22=600 +title23=Baldies +path23=C:\Games\Baldies for Win95\baldies.exe +module23= +ver23=0 +flag23=537010210 +flagg23=0 +tflag23=0 +initx23=0 +inity23=0 +minx23=0 +miny23=0 +maxx23=0 +maxy23=0 +posx23=50 +posy23=50 +sizx23=800 +sizy23=600 +title24=Battle Arena Toshinden 2 +path24=D:\Games\Battle Arena Toshinden 2\T2.EXE +module24= +ver24=0 +flag24=134217761 +flagg24=134217808 +tflag24=3 +initx24=0 +inity24=0 +minx24=0 +miny24=0 +maxx24=0 +maxy24=0 +posx24=50 +posy24=50 +sizx24=800 +sizy24=600 +title25=Beasts & Bumpkins +path25=C:\Games\Beasts and Bumpkins\BEASTS.EXE +module25= +ver25=0 +flag25=2105890 +flagg25=0 +tflag25=2 +initx25=0 +inity25=0 +minx25=0 +miny25=0 +maxx25=0 +maxy25=0 +posx25=50 +posy25=50 +sizx25=800 +sizy25=600 +title26=Beats of Rage +path26=C:\Games\BOR\BeatsOfRage.exe +module26= +ver26=0 +flag26=537002018 +flagg26=0 +tflag26=0 +initx26=0 +inity26=0 +minx26=0 +miny26=0 +maxx26=0 +maxy26=0 +posx26=50 +posy26=50 +sizx26=800 +sizy26=600 +title27=Beyond Good & Evil Demo +path27=C:\Games\Beyond Good & Evil\BGE.exe +module27= +ver27=0 +flag27=0 +flagg27=0 +tflag27=0 +initx27=0 +inity27=0 +minx27=0 +miny27=0 +maxx27=0 +maxy27=0 +posx27=50 +posy27=50 +sizx27=800 +sizy27=600 +title28=Black Moon Lune Noire +path28=C:\Games\Black Moon\Lune noire\Engine.exe +module28= +ver28=0 +flag28=262179 +flagg28=0 +tflag28=0 +initx28=0 +inity28=0 +minx28=0 +miny28=0 +maxx28=0 +maxy28=0 +posx28=50 +posy28=50 +sizx28=800 +sizy28=600 +title29=Blood Omen Legacy of Kain +path29=C:\Games\Blood Omen\KAIN.EXE +module29= +ver29=0 +flag29=49190 +flagg29=0 +tflag29=0 +initx29=0 +inity29=0 +minx29=0 +miny29=0 +maxx29=0 +maxy29=0 +posx29=50 +posy29=50 +sizx29=800 +sizy29=600 +title30=Bonkheads +path30=C:\Games\Bonkheads\Bonkheads.exe +module30= +ver30=0 +flag30=262690 +flagg30=16 +tflag30=78 +initx30=0 +inity30=0 +minx30=0 +miny30=0 +maxx30=0 +maxy30=0 +posx30=50 +posy30=50 +sizx30=800 +sizy30=600 +title31=Bubble Bobble 2 +path31=C:\Games\bubble2\BOBO2.EXE +module31= +ver31=0 +flag31=34 +flagg31=0 +tflag31=0 +initx31=0 +inity31=0 +minx31=0 +miny31=0 +maxx31=0 +maxy31=0 +posx31=50 +posy31=50 +sizx31=800 +sizy31=600 +title32=Bug! +path32=C:\Games\Bug\BUG!.EXE +module32= +ver32=0 +flag32=134225954 +flagg32=32 +tflag32=2 +initx32=0 +inity32=0 +minx32=0 +miny32=0 +maxx32=0 +maxy32=0 +posx32=0 +posy32=0 +sizx32=800 +sizy32=600 +title33=Caesar III +path33=C:\Games\Caesar III\c3.exe +module33= +ver33=0 +flag33=-2147475422 +flagg33=0 +tflag33=0 +initx33=0 +inity33=0 +minx33=0 +miny33=0 +maxx33=0 +maxy33=0 +posx33=50 +posy33=50 +sizx33=800 +sizy33=600 +title34=Championship Manager 99-00 +path34=C:\Games\CM9900\cm9900.exe +module34= +ver34=0 +flag34=10306 +flagg34=0 +tflag34=0 +initx34=0 +inity34=0 +minx34=0 +miny34=0 +maxx34=0 +maxy34=0 +posx34=50 +posy34=50 +sizx34=800 +sizy34=600 +title35=Civilization Call to Power +path35=C:\Games\civctp\Civilization_Call_To_Power\ctp_program\ctp\civctp.exe +module35= +ver35=0 +flag35=545267746 +flagg35=0 +tflag35=0 +initx35=0 +inity35=0 +minx35=0 +miny35=0 +maxx35=0 +maxy35=0 +posx35=50 +posy35=50 +sizx35=800 +sizy35=600 +title36=Claw +path36=C:\Games\claw\clawexe.exe +module36= +ver36=0 +flag36=24610 +flagg36=0 +tflag36=0 +initx36=0 +inity36=0 +minx36=0 +miny36=0 +maxx36=0 +maxy36=0 +posx36=50 +posy36=50 +sizx36=800 +sizy36=600 +title37=Commando's Behind Enemy Lines Demo +path37=C:\Games\Commando's Behind Enemy Lines Demo\COMANDOS\Comandos.exe +module37= +ver37=0 +flag37=1744838944 +flagg37=0 +tflag37=64 +initx37=0 +inity37=0 +minx37=0 +miny37=0 +maxx37=0 +maxy37=0 +posx37=50 +posy37=50 +sizx37=800 +sizy37=600 +title38=Commandos II: Men of Courage +path38=C:\Games\Commandos II\comm2.exe +module38= +ver38=0 +flag38=-1207951008 +flagg38=0 +tflag38=0 +initx38=0 +inity38=0 +minx38=0 +miny38=0 +maxx38=0 +maxy38=0 +posx38=50 +posy38=50 +sizx38=800 +sizy38=600 +title39=Crazy Taxy +path39=C:\Games\Crazy_Taxi\Crazy Taxi PC Version\crazy_taxi_pc.exe +module39= +ver39=8 +flag39=536870945 +flagg39=0 +tflag39=0 +initx39=0 +inity39=0 +minx39=0 +miny39=0 +maxx39=0 +maxy39=0 +posx39=50 +posy39=50 +sizx39=800 +sizy39=600 +title40=Crush! Deluxe +path40=C:\Games\Crush! Deluxe\CRUSHD.EXE +module40= +ver40=0 +flag40=134492706 +flagg40=0 +tflag40=0 +initx40=0 +inity40=0 +minx40=0 +miny40=0 +maxx40=0 +maxy40=0 +posx40=50 +posy40=50 +sizx40=800 +sizy40=600 +title41=Cybermercs +path41=C:\Games\cybermercs\cybermercs.exe +module41= +ver41=0 +flag41=134234146 +flagg41=16 +tflag41=0 +initx41=0 +inity41=0 +minx41=0 +miny41=0 +maxx41=0 +maxy41=0 +posx41=50 +posy41=50 +sizx41=800 +sizy41=600 +title42=Daikatana +path42=D:\Games\Daikatana\daikatana.exe +module42=ref_gl.dll +ver42=10 +flag42=538051074 +flagg42=131585 +tflag42=259 +initx42=0 +inity42=0 +minx42=0 +miny42=0 +maxx42=0 +maxy42=0 +posx42=50 +posy42=50 +sizx42=800 +sizy42=600 +title43=Darius Gaiden +path43=C:\Games\Darius_gaiden\DARIUS.EXE +module43= +ver43=0 +flag43=536870946 +flagg43=0 +tflag43=0 +initx43=0 +inity43=0 +minx43=0 +miny43=0 +maxx43=0 +maxy43=0 +posx43=50 +posy43=50 +sizx43=800 +sizy43=600 +title44=Dark Colony the Council Wars +path44=C:\Games\darkcolony_council\dc\DC16.EXE +module44= +ver44=0 +flag44=268435462 +flagg44=0 +tflag44=0 +initx44=0 +inity44=0 +minx44=0 +miny44=0 +maxx44=0 +maxy44=0 +posx44=50 +posy44=50 +sizx44=800 +sizy44=600 +title45=Darkstone +path45=C:\Games\darkstone\Darkstone.exe +module45= +ver45=0 +flag45=134234148 +flagg45=0 +tflag45=0 +initx45=0 +inity45=0 +minx45=0 +miny45=0 +maxx45=0 +maxy45=0 +posx45=50 +posy45=50 +sizx45=800 +sizy45=600 +title46=Dave Mirra Freestyle BMX Demo +path46=C:\Games\Dave Mirra Freestyle BMX\NgBMXDemo.exe +module46= +ver46=0 +flag46=8224 +flagg46=0 +tflag46=0 +initx46=0 +inity46=0 +minx46=0 +miny46=0 +maxx46=0 +maxy46=0 +posx46=50 +posy46=50 +sizx46=800 +sizy46=600 +title47=Daytona USA Deluxe +path47=C:\Games\Daytona USA Deluxe\DAYTONA USA Deluxe.exe +module47= +ver47=0 +flag47=402661410 +flagg47=0 +tflag47=0 +initx47=0 +inity47=0 +minx47=0 +miny47=0 +maxx47=0 +maxy47=0 +posx47=50 +posy47=50 +sizx47=800 +sizy47=600 +title48=Deadlock 2 +path48=C:\Games\deadlock2\DEADLOCK.EXE +module48= +ver48=0 +flag48=-2012995550 +flagg48=0 +tflag48=0 +initx48=0 +inity48=0 +minx48=0 +miny48=0 +maxx48=0 +maxy48=0 +posx48=50 +posy48=50 +sizx48=800 +sizy48=600 +title49=Deeper Dungeons 95 +path49=C:\Games\Keeper95\Deeper95.exe +module49= +ver49=0 +flag49=268460070 +flagg49=0 +tflag49=0 +initx49=0 +inity49=0 +minx49=0 +miny49=0 +maxx49=0 +maxy49=0 +posx49=50 +posy49=50 +sizx49=800 +sizy49=600 +title50=Delta Force +path50=C:\Games\Delta Force\Df.exe +module50= +ver50=0 +flag50=34 +flagg50=0 +tflag50=0 +initx50=0 +inity50=0 +minx50=0 +miny50=0 +maxx50=0 +maxy50=0 +posx50=50 +posy50=50 +sizx50=800 +sizy50=600 +title51=Dementia +path51=C:\Games\dementia\program\CRUX.EXE -h +module51= +ver51=0 +flag51=536887330 +flagg51=0 +tflag51=2 +initx51=0 +inity51=0 +minx51=0 +miny51=0 +maxx51=0 +maxy51=0 +posx51=50 +posy51=50 +sizx51=800 +sizy51=600 +title52=Dethkarz +path52=D:\Games\DethKarz\Dethkarz.exe +module52= +ver52=0 +flag52=0 +flagg52=0 +tflag52=0 +initx52=0 +inity52=0 +minx52=0 +miny52=0 +maxx52=0 +maxy52=0 +posx52=50 +posy52=50 +sizx52=800 +sizy52=600 +title53=Devil Inside +path53=C:\Games\Devil Inside\Devil.exe +module53= +ver53=0 +flag53=32 +flagg53=0 +tflag53=0 +initx53=0 +inity53=0 +minx53=0 +miny53=0 +maxx53=0 +maxy53=0 +posx53=50 +posy53=50 +sizx53=800 +sizy53=600 +title54=Diablo +path54=D:\Games\Diablo\Diablo.exe +module54= +ver54=1 +flag54=134234150 +flagg54=16 +tflag54=2 +initx54=0 +inity54=0 +minx54=0 +miny54=0 +maxx54=0 +maxy54=0 +posx54=50 +posy54=50 +sizx54=800 +sizy54=600 +title55=Dink Smallwood (BAD) +path55=C:\Games\Dink SmallWood\Dink.exe +module55= +ver55=0 +flag55=546 +flagg55=0 +tflag55=258 +initx55=0 +inity55=0 +minx55=0 +miny55=0 +maxx55=0 +maxy55=0 +posx55=50 +posy55=50 +sizx55=800 +sizy55=600 +title56=Doom 64 Absolution +path56=D:\Games\Doom 64\Bin\Absolution.exe +module56= +ver56=8 +flag56=0 +flagg56=86016 +tflag56=259 +initx56=0 +inity56=0 +minx56=0 +miny56=0 +maxx56=0 +maxy56=0 +posx56=50 +posy56=50 +sizx56=800 +sizy56=600 +title57=Drakan +path57=C:\Games\Drakan\drakan.exe +module57= +ver57=0 +flag57=536887328 +flagg57=0 +tflag57=0 +initx57=0 +inity57=0 +minx57=0 +miny57=0 +maxx57=0 +maxy57=0 +posx57=50 +posy57=50 +sizx57=800 +sizy57=600 +title58=Dream Aquarium +path58=D:\Program Files\Dream Aquarium\Dream_Aquarium.scr +module58= +ver58=9 +flag58=679477249 +flagg58=303104 +tflag58=256 +initx58=0 +inity58=0 +minx58=0 +miny58=0 +maxx58=0 +maxy58=0 +posx58=50 +posy58=50 +sizx58=800 +sizy58=600 +title59=Dungeon Keeper 2 GOG release +path59=D:\Games\Dungeon Keeper 2 GOG release\DKII.EXE +module59= +ver59=0 +flag59=134217762 +flagg59=4276224 +tflag59=6 +initx59=0 +inity59=0 +minx59=0 +miny59=0 +maxx59=0 +maxy59=0 +posx59=50 +posy59=50 +sizx59=800 +sizy59=600 +title60=Dungeon Keeper 95 +path60=D:\Games\Keeper95\KEEPER95.EXE +module60= +ver60=0 +flag60=24614 +flagg60=0 +tflag60=64 +initx60=0 +inity60=0 +minx60=0 +miny60=0 +maxx60=0 +maxy60=0 +posx60=50 +posy60=50 +sizx60=800 +sizy60=600 +title61=Dungeon Keeper II +path61=D:\Games\Dungeon Keeper 2\DKII.exe +module61= +ver61=0 +flag61=34 +flagg61=0 +tflag61=262 +initx61=0 +inity61=0 +minx61=0 +miny61=0 +maxx61=0 +maxy61=0 +posx61=150 +posy61=50 +sizx61=800 +sizy61=600 +title62=Emergency Fighters for life +path62=D:\Games\Emergency\EMERGY.EXE +module62= +ver62=0 +flag62=134545443 +flagg62=18 +tflag62=3 +initx62=0 +inity62=0 +minx62=0 +miny62=0 +maxx62=0 +maxy62=0 +posx62=50 +posy62=50 +sizx62=800 +sizy62=600 +title63=Enemy Infestation +path63=C:\Games\Enemy Infestation (1998)\Ei.exe +module63= +ver63=0 +flag63=38 +flagg63=0 +tflag63=0 +initx63=0 +inity63=0 +minx63=0 +miny63=0 +maxx63=0 +maxy63=0 +posx63=50 +posy63=50 +sizx63=800 +sizy63=600 +title64=Evil Genius +path64=D:\Games\Evil Genius\ReleaseExe\EvilGenius_Cracked.exe +module64= +ver64=9 +flag64=2053 +flagg64=80 +tflag64=0 +initx64=0 +inity64=0 +minx64=0 +miny64=0 +maxx64=0 +maxy64=0 +posx64=50 +posy64=50 +sizx64=800 +sizy64=600 +title65=Expendable +path65=C:\Games\eXpendable\go.exe -nocputest +module65= +ver65=0 +flag65=402653280 +flagg65=1 +tflag65=2 +initx65=0 +inity65=0 +minx65=0 +miny65=0 +maxx65=0 +maxy65=0 +posx65=50 +posy65=50 +sizx65=800 +sizy65=600 +title66=Fallen Heaven (BAD) +path66=C:\Games\falhaven\Exe\FALLEN.EXE +module66= +ver66=0 +flag66=679485962 +flagg66=32 +tflag66=0 +initx66=0 +inity66=0 +minx66=0 +miny66=0 +maxx66=0 +maxy66=0 +posx66=0 +posy66=0 +sizx66=800 +sizy66=600 +title67=Fallout +path67=D:\Games\Fallout\FALLOUTW.EXE +module67= +ver67=1 +flag67=134217734 +flagg67=16 +tflag67=0 +initx67=0 +inity67=0 +minx67=0 +miny67=0 +maxx67=0 +maxy67=0 +posx67=50 +posy67=50 +sizx67=800 +sizy67=600 +title68=FreakOut +path68=C:\Games\Freak Out - Extreme Freeride\FreakOut.exe +module68= +ver68=9 +flag68=0 +flagg68=0 +tflag68=2 +initx68=0 +inity68=0 +minx68=0 +miny68=0 +maxx68=0 +maxy68=0 +posx68=50 +posy68=50 +sizx68=800 +sizy68=600 +title69=Funtracks +path69=C:\Games\Funtracks\Fun_win.exe +module69= +ver69=1 +flag69=2 +flagg69=0 +tflag69=258 +initx69=0 +inity69=0 +minx69=0 +miny69=0 +maxx69=0 +maxy69=0 +posx69=50 +posy69=50 +sizx69=800 +sizy69=600 +title70=Galapagos +path70=C:\Games\Galapagos\GALA.EXE +module70= +ver70=0 +flag70=134217760 +flagg70=0 +tflag70=0 +initx70=0 +inity70=0 +minx70=0 +miny70=0 +maxx70=0 +maxy70=0 +posx70=50 +posy70=50 +sizx70=800 +sizy70=600 +title71=Gangsters +path71=C:\Games\Gangsters\gangsters.exe +module71= +ver71=0 +flag71=134217762 +flagg71=0 +tflag71=2 +initx71=0 +inity71=0 +minx71=0 +miny71=0 +maxx71=0 +maxy71=0 +posx71=100 +posy71=100 +sizx71=800 +sizy71=600 +title72=GeneRally +path72=C:\Games\generally105\GeneRally.exe +module72= +ver72=0 +flag72=34 +flagg72=0 +tflag72=0 +initx72=0 +inity72=0 +minx72=0 +miny72=0 +maxx72=0 +maxy72=0 +posx72=50 +posy72=50 +sizx72=800 +sizy72=600 +title73=Get Medieval +path73=C:\Games\Get Medieval\MEDIEVAL.EXE +module73= +ver73=0 +flag73=34 +flagg73=2 +tflag73=0 +initx73=0 +inity73=0 +minx73=0 +miny73=0 +maxx73=0 +maxy73=0 +posx73=0 +posy73=0 +sizx73=800 +sizy73=600 +title74=Gift +path74=C:\Games\Gift\Gift.exe +module74= +ver74=0 +flag74=4196384 +flagg74=0 +tflag74=34 +initx74=0 +inity74=0 +minx74=0 +miny74=0 +maxx74=0 +maxy74=0 +posx74=0 +posy74=0 +sizx74=0 +sizy74=0 +title75=Golden Age of Racing +path75=C:\Games\Golden Age of Racing\GAOR.exe +module75= +ver75=0 +flag75=34 +flagg75=0 +tflag75=0 +initx75=0 +inity75=0 +minx75=0 +miny75=0 +maxx75=0 +maxy75=0 +posx75=50 +posy75=50 +sizx75=800 +sizy75=600 +title76=Gp500 for Win2K +path76=C:\Games\gp500\gp500_win2k.exe +module76= +ver76=1 +flag76=545677860 +flagg76=0 +tflag76=2 +initx76=0 +inity76=0 +minx76=0 +miny76=0 +maxx76=0 +maxy76=0 +posx76=50 +posy76=50 +sizx76=800 +sizy76=600 +title77=G-Police +path77=C:\Games\gpolice\GPOLICE.EXE +module77= +ver77=0 +flag77=67125286 +flagg77=0 +tflag77=2 +initx77=0 +inity77=0 +minx77=0 +miny77=0 +maxx77=0 +maxy77=0 +posx77=50 +posy77=50 +sizx77=800 +sizy77=600 +title78=Grand Prix Legends +path78=D:\Games\Grand Prix Legends\gpl\gpl.exe +module78= +ver78=0 +flag78=-1979678717 +flagg78=4 +tflag78=3 +initx78=0 +inity78=0 +minx78=0 +miny78=0 +maxx78=0 +maxy78=0 +posx78=50 +posy78=50 +sizx78=0 +sizy78=0 +title79=Grim Fandango Demo +path79=C:\Games\GrimWebDemo\grimdemo.exe +module79= +ver79=0 +flag79=34 +flagg79=0 +tflag79=258 +initx79=0 +inity79=0 +minx79=0 +miny79=0 +maxx79=0 +maxy79=0 +posx79=50 +posy79=50 +sizx79=800 +sizy79=600 +title80=Half-Life Blue-Shift (d3d) +path80=D:\Games\Half-Life Blue-Shift\bshift.exe +module80= +ver80=7 +flag80=1207959554 +flagg80=513 +tflag80=258 +initx80=0 +inity80=0 +minx80=0 +miny80=0 +maxx80=0 +maxy80=0 +posx80=50 +posy80=50 +sizx80=800 +sizy80=600 +title81=Half-Life Uplink Demo +path81=D:\Games\Half-Life Uplink\hldemo.exe +module81= +ver81=1 +flag81=1073741826 +flagg81=16384 +tflag81=2 +initx81=0 +inity81=0 +minx81=0 +miny81=0 +maxx81=0 +maxy81=0 +posx81=50 +posy81=50 +sizx81=640 +sizy81=480 +title82=Halo Combat Evolved +path82=D:\Games\Halo Combat Evolved\halo.exe +module82= +ver82=9 +flag82=570425377 +flagg82=0 +tflag82=478 +initx82=0 +inity82=0 +minx82=0 +miny82=0 +maxx82=0 +maxy82=0 +posx82=50 +posy82=50 +sizx82=800 +sizy82=600 +title83=Heart of Darkness +path83=d:\Games\Heart of Darkness\HODWin32.exe +module83= +ver83=0 +flag83=8226 +flagg83=2179072 +tflag83=0 +initx83=0 +inity83=0 +minx83=0 +miny83=0 +maxx83=0 +maxy83=0 +posx83=50 +posy83=50 +sizx83=800 +sizy83=600 +title84=Heavy Metal FAKK 2 +path84=C:\Games\Heavy Metal - FAKK2\fakk2.exe +module84= +ver84=0 +flag84=33554464 +flagg84=64 +tflag84=2 +initx84=0 +inity84=0 +minx84=0 +miny84=0 +maxx84=0 +maxy84=0 +posx84=50 +posy84=50 +sizx84=800 +sizy84=600 +title85=HellCopter +path85=C:\Games\hellcop\HCopter.exe +module85= +ver85=0 +flag85=-2013249500 +flagg85=256 +tflag85=0 +initx85=0 +inity85=0 +minx85=0 +miny85=0 +maxx85=0 +maxy85=0 +posx85=50 +posy85=50 +sizx85=800 +sizy85=600 +title86=Heroes of Might & Magic III Demo +path86=C:\Games\Heroes III Demo\h3demo.exe +module86= +ver86=1 +flag86=134234146 +flagg86=0 +tflag86=2 +initx86=0 +inity86=0 +minx86=0 +miny86=0 +maxx86=0 +maxy86=0 +posx86=50 +posy86=50 +sizx86=800 +sizy86=600 +title87=Hexen II (opengl) +path87=D:\Games\Hexen II\glh2.exe +module87= +ver87=10 +flag87=3 +flagg87=212993 +tflag87=387 +initx87=0 +inity87=0 +minx87=0 +miny87=0 +maxx87=0 +maxy87=0 +posx87=50 +posy87=50 +sizx87=800 +sizy87=600 +title88=Hexen II (software) +path88=D:\Games\Hexen II\h2.exe +module88= +ver88=10 +flag88=671088642 +flagg88=1130496 +tflag88=0 +initx88=0 +inity88=0 +minx88=0 +miny88=0 +maxx88=0 +maxy88=0 +posx88=50 +posy88=50 +sizx88=800 +sizy88=600 +title89=hover +path89=C:\Games\hover\hoverX.exe +module89= +ver89=0 +flag89=8224 +flagg89=0 +tflag89=0 +initx89=0 +inity89=0 +minx89=0 +miny89=0 +maxx89=0 +maxy89=0 +posx89=50 +posy89=50 +sizx89=800 +sizy89=600 +title90=Hyperblade +path90=D:\Games\Hyperblade\HYPERX.EXE +module90= +ver90=0 +flag90=134217891 +flagg90=3231762 +tflag90=2 +initx90=0 +inity90=0 +minx90=0 +miny90=0 +maxx90=0 +maxy90=0 +posx90=50 +posy90=50 +sizx90=800 +sizy90=600 +title91=Idinaloq +path91=C:\Games\idina101\idinaloq.exe +module91= +ver91=0 +flag91=32 +flagg91=0 +tflag91=0 +initx91=0 +inity91=0 +minx91=0 +miny91=0 +maxx91=0 +maxy91=0 +posx91=50 +posy91=50 +sizx91=800 +sizy91=600 +title92=Immanis +path92=C:\Games\Immanis CD release\immanis.exe +module92= +ver92=0 +flag92=24611 +flagg92=0 +tflag92=0 +initx92=0 +inity92=0 +minx92=0 +miny92=0 +maxx92=0 +maxy92=0 +posx92=50 +posy92=50 +sizx92=800 +sizy92=600 +title93=Immanis (v2) +path93=C:\Games\Immanis CD release\immanis_v2.exe +module93= +ver93=0 +flag93=268460067 +flagg93=0 +tflag93=0 +initx93=0 +inity93=0 +minx93=0 +miny93=0 +maxx93=0 +maxy93=0 +posx93=50 +posy93=50 +sizx93=800 +sizy93=600 +title94=In the Hunt +path94=C:\Games\In The Hunt\e8.exe +module94= +ver94=0 +flag94=2 +flagg94=0 +tflag94=0 +initx94=0 +inity94=0 +minx94=0 +miny94=0 +maxx94=0 +maxy94=0 +posx94=50 +posy94=50 +sizx94=800 +sizy94=600 +title95=Incoming Forces +path95=D:\Games\Incoming Forces\forces.exe +module95= +ver95=8 +flag95=134217760 +flagg95=0 +tflag95=2 +initx95=0 +inity95=0 +minx95=0 +miny95=0 +maxx95=0 +maxy95=0 +posx95=50 +posy95=50 +sizx95=800 +sizy95=600 +title96=International Superstar Soccer 3 +path96=C:\Games\ISS_3\iss3.exe +module96= +ver96=8 +flag96=545267715 +flagg96=0 +tflag96=0 +initx96=0 +inity96=0 +minx96=0 +miny96=0 +maxx96=0 +maxy96=0 +posx96=50 +posy96=50 +sizx96=800 +sizy96=600 +title97=Jacked +path97=D:\Games\Jacked\Jacked.exe +module97=winmm +ver97=9 +flag97=537010208 +flagg97=196608 +tflag97=258 +initx97=0 +inity97=0 +minx97=0 +miny97=0 +maxx97=0 +maxy97=0 +posx97=50 +posy97=50 +sizx97=800 +sizy97=600 +title98=Jedi Knight II Jedi Outcast +path98=D:\Games\Jedi Knight II Jedi Outcast\GameData\jk2sp.exe +module98= +ver98=0 +flag98=0 +flagg98=512 +tflag98=266 +initx98=0 +inity98=0 +minx98=0 +miny98=0 +maxx98=0 +maxy98=0 +posx98=50 +posy98=50 +sizx98=800 +sizy98=600 +title99=Jet Moto +path99=M:\JETMOTO.EXE +module99= +ver99=0 +flag99=139298 +flagg99=0 +tflag99=0 +initx99=0 +inity99=0 +minx99=0 +miny99=0 +maxx99=0 +maxy99=0 +posx99=50 +posy99=50 +sizx99=800 +sizy99=600 +title100=Kiss Psyco Cyrcus +path100=C:\Games\Psycho\client.exe +module100=d3d.ren +ver100=7 +flag100=537018404 +flagg100=0 +tflag100=0 +initx100=0 +inity100=0 +minx100=0 +miny100=0 +maxx100=0 +maxy100=0 +posx100=50 +posy100=50 +sizx100=800 +sizy100=600 +title101=Krazy Ivan +path101=C:\Games\Krazy Ivan\KRAZY.EXE +module101= +ver101=0 +flag101=536870914 +flagg101=0 +tflag101=0 +initx101=0 +inity101=0 +minx101=0 +miny101=0 +maxx101=0 +maxy101=0 +posx101=50 +posy101=50 +sizx101=800 +sizy101=600 +title102=Last Bronx +path102=C:\Games\Last_Bronx\LB.EXE +module102= +ver102=0 +flag102=40994 +flagg102=0 +tflag102=64 +initx102=0 +inity102=0 +minx102=0 +miny102=0 +maxx102=0 +maxy102=0 +posx102=50 +posy102=50 +sizx102=800 +sizy102=600 +title103=Lionheart +path103=C:\Games\Lionheart Demo\Lionheart.exe +module103= +ver103=0 +flag103=-2147483612 +flagg103=0 +tflag103=0 +initx103=0 +inity103=0 +minx103=0 +miny103=0 +maxx103=0 +maxy103=0 +posx103=50 +posy103=50 +sizx103=800 +sizy103=600 +title104=lithtech.exe +path104=D:\Games\NOLF Technology Demo\lithtech.exe +module104= +ver104=7 +flag104=0 +flagg104=512 +tflag104=258 +initx104=0 +inity104=0 +minx104=0 +miny104=0 +maxx104=0 +maxy104=0 +posx104=50 +posy104=50 +sizx104=800 +sizy104=600 +title105=Lords of the Realm 2 +path105=D:\Games\L2SIEGE\LORDS2.EXE +module105= +ver105=0 +flag105=38 +flagg105=65536 +tflag105=9 +initx105=0 +inity105=0 +minx105=0 +miny105=0 +maxx105=0 +maxy105=0 +posx105=50 +posy105=50 +sizx105=800 +sizy105=600 +title106=M.A.X. 2 +path106=C:\Games\MAX 2\MAX_2\MAX2\MAX2.EXE +module106= +ver106=0 +flag106=34 +flagg106=0 +tflag106=0 +initx106=0 +inity106=0 +minx106=0 +miny106=0 +maxx106=0 +maxy106=0 +posx106=50 +posy106=50 +sizx106=800 +sizy106=600 +title107=M1 Tank Platoon 2 +path107=C:\Games\M1 Tank Platoon 2\M1TP2.exe +module107= +ver107=8 +flag107=34 +flagg107=0 +tflag107=0 +initx107=0 +inity107=0 +minx107=0 +miny107=0 +maxx107=0 +maxy107=0 +posx107=50 +posy107=50 +sizx107=800 +sizy107=600 +title108=Mario Worlds (stripped PE) +path108=C:\Games\Mario Worlds\Mario Worlds.exe +module108= +ver108=1 +flag108=2 +flagg108=1 +tflag108=386 +initx108=0 +inity108=0 +minx108=0 +miny108=0 +maxx108=0 +maxy108=0 +posx108=50 +posy108=50 +sizx108=800 +sizy108=600 +title109=Masters of Orion 2 +path109=C:\Games\Orion2\Orion95.exe +module109= +ver109=0 +flag109=34 +flagg109=0 +tflag109=0 +initx109=0 +inity109=0 +minx109=0 +miny109=0 +maxx109=0 +maxy109=0 +posx109=50 +posy109=50 +sizx109=800 +sizy109=600 +title110=Microsoft Flight Simulator 98 +path110=C:\Games\Flight Simulator 98\FLTSIM98.EXE +module110= +ver110=0 +flag110=288 +flagg110=0 +tflag110=0 +initx110=0 +inity110=0 +minx110=0 +miny110=0 +maxx110=0 +maxy110=0 +posx110=50 +posy110=50 +sizx110=800 +sizy110=600 +title111=Microsoft Midtown Madness +path111=C:\Games\Midtown Madness\midtown.exe +module111= +ver111=0 +flag111=8192 +flagg111=0 +tflag111=2 +initx111=0 +inity111=0 +minx111=0 +miny111=0 +maxx111=0 +maxy111=0 +posx111=50 +posy111=50 +sizx111=800 +sizy111=600 +title112=Microsoft Midtown Madness Trial (BAD) +path112=C:\Games\Midtown Madness Trial\midtrial.exe +module112= +ver112=0 +flag112=2 +flagg112=0 +tflag112=0 +initx112=0 +inity112=0 +minx112=0 +miny112=0 +maxx112=0 +maxy112=0 +posx112=0 +posy112=0 +sizx112=800 +sizy112=600 +title113=Microsoft Motocross Madness 2 (BAD!!) +path113=C:\Games\Motocross Madness 2\MCM2.cracked.EXE +module113= +ver113=7 +flag113=201326664 +flagg113=1 +tflag113=82 +initx113=0 +inity113=0 +minx113=0 +miny113=0 +maxx113=0 +maxy113=0 +posx113=50 +posy113=50 +sizx113=800 +sizy113=600 +title114=Microsoft Motocross Madness Trial (BAD) +path114=C:\Games\Motocross Madness Trial\mcm.exe +module114= +ver114=1 +flag114=134225952 +flagg114=0 +tflag114=130 +initx114=0 +inity114=0 +minx114=0 +miny114=0 +maxx114=0 +maxy114=0 +posx114=50 +posy114=50 +sizx114=0 +sizy114=0 +title115=Mission Force Cyberstorm (BAD ?) +path115=C:\Games\SIERRA\CSTORM\CSTORM.EXE +module115= +ver115=0 +flag115=33562658 +flagg115=0 +tflag115=0 +initx115=0 +inity115=0 +minx115=0 +miny115=0 +maxx115=0 +maxy115=0 +posx115=50 +posy115=50 +sizx115=0 +sizy115=0 +title116=Monopoly 3D +path116=C:\Games\Monopoly (Edition 3D)\Monopoly.exe +module116= +ver116=0 +flag116=134244388 +flagg116=0 +tflag116=2 +initx116=0 +inity116=0 +minx116=0 +miny116=0 +maxx116=0 +maxy116=0 +posx116=50 +posy116=50 +sizx116=800 +sizy116=600 +title117=Monster Truck Madness 2 +path117=C:\Games\Monster Truck Madness 2\Monster.EXE +module117= +ver117=1 +flag117=34 +flagg117=1 +tflag117=0 +initx117=0 +inity117=0 +minx117=0 +miny117=0 +maxx117=0 +maxy117=0 +posx117=50 +posy117=50 +sizx117=800 +sizy117=600 +title118=Moto Racer Demo +path118=D:\Games\Moto Racer Demo\PlayDemo.exe +module118= +ver118=0 +flag118=167903267 +flagg118=192 +tflag118=14 +initx118=0 +inity118=0 +minx118=0 +miny118=0 +maxx118=0 +maxy118=0 +posx118=50 +posy118=50 +sizx118=800 +sizy118=600 +title119=Necrodrome +path119=C:\Games\Necrodome\NECRO95.EXE +module119= +ver119=0 +flag119=268435495 +flagg119=256 +tflag119=0 +initx119=0 +inity119=0 +minx119=0 +miny119=0 +maxx119=0 +maxy119=0 +posx119=50 +posy119=50 +sizx119=800 +sizy119=600 +title120=Need For Speed - Porsche 2000 +path120=C:\Games\Need For Speed - Porsche 2000\Porsche.exe +module120= +ver120=7 +flag120=0 +flagg120=0 +tflag120=258 +initx120=0 +inity120=0 +minx120=0 +miny120=0 +maxx120=0 +maxy120=0 +posx120=50 +posy120=50 +sizx120=800 +sizy120=600 +title121=Netstorm Islands at War +path121=C:\Games\Netstorm\Netstorm.exe +module121= +ver121=0 +flag121=2 +flagg121=0 +tflag121=0 +initx121=0 +inity121=0 +minx121=0 +miny121=0 +maxx121=0 +maxy121=0 +posx121=50 +posy121=50 +sizx121=800 +sizy121=600 +title122=Nox +path122=d:\Games\Nox\Game.exe +module122= +ver122=0 +flag122=939540515 +flagg122=0 +tflag122=386 +initx122=0 +inity122=0 +minx122=0 +miny122=0 +maxx122=0 +maxy122=0 +posx122=50 +posy122=50 +sizx122=800 +sizy122=600 +title123=Pacific General +path123=C:\Games\Pacific General\PACGEN.EXE +module123= +ver123=0 +flag123=8226 +flagg123=0 +tflag123=2 +initx123=0 +inity123=0 +minx123=0 +miny123=0 +maxx123=0 +maxy123=0 +posx123=50 +posy123=50 +sizx123=800 +sizy123=600 +title124=Project Nomads Demo (BAD) +path124=C:\Games\Project Nomads Demo\bin\win32\nomads.exe +module124= +ver124=8 +flag124=-1476394912 +flagg124=256 +tflag124=258 +initx124=0 +inity124=0 +minx124=0 +miny124=0 +maxx124=0 +maxy124=0 +posx124=50 +posy124=50 +sizx124=800 +sizy124=600 +title125=Puzzle Bubble +path125=C:\Games\Puzzle Bubble\PB.EXE +module125= +ver125=0 +flag125=34 +flagg125=0 +tflag125=0 +initx125=0 +inity125=0 +minx125=0 +miny125=0 +maxx125=0 +maxy125=0 +posx125=50 +posy125=50 +sizx125=800 +sizy125=600 +title126=Quake 2 +path126=D:\Games\QUAKE2\quake2.exe +module126= +ver126=10 +flag126=167772672 +flagg126=1 +tflag126=386 +initx126=0 +inity126=0 +minx126=0 +miny126=0 +maxx126=0 +maxy126=0 +posx126=50 +posy126=50 +sizx126=800 +sizy126=600 +title127=Quake 3 Arena +path127=D:\Games\Q3A\quake3.exe +module127= +ver127=10 +flag127=0 +flagg127=513 +tflag127=0 +initx127=0 +inity127=0 +minx127=0 +miny127=0 +maxx127=0 +maxy127=0 +posx127=50 +posy127=50 +sizx127=800 +sizy127=600 +title128=Raiden II +path128=C:\Games\Raiden II\Raiden II\RAIDENII.EXE +module128= +ver128=0 +flag128=34 +flagg128=0 +tflag128=0 +initx128=0 +inity128=0 +minx128=0 +miny128=0 +maxx128=0 +maxy128=0 +posx128=50 +posy128=50 +sizx128=800 +sizy128=600 +title129=Railroad Tycoon II +path129=C:\Games\Railroad.Tycoon.II\RT2.EXE +module129= +ver129=1 +flag129=134225954 +flagg129=0 +tflag129=0 +initx129=0 +inity129=0 +minx129=0 +miny129=0 +maxx129=0 +maxy129=0 +posx129=50 +posy129=50 +sizx129=800 +sizy129=600 +title130=Rally Championship 2000 +path130=C:\Games\Rally Championship 2000\RAL.EXE +module130= +ver130=0 +flag130=67108864 +flagg130=0 +tflag130=2 +initx130=0 +inity130=0 +minx130=0 +miny130=0 +maxx130=0 +maxy130=0 +posx130=50 +posy130=50 +sizx130=800 +sizy130=600 +title131=Rebel Moon Rising +path131=C:\Games\Rebel Moon Rising\Rmr.exe +module131= +ver131=0 +flag131=0 +flagg131=0 +tflag131=0 +initx131=0 +inity131=0 +minx131=0 +miny131=0 +maxx131=0 +maxy131=0 +posx131=50 +posy131=50 +sizx131=800 +sizy131=600 +title132=Redline - Gang Warfare 2066 +path132=C:\Games\Redline - Gang Warfare 2066\redline.exe +module132= +ver132=0 +flag132=32 +flagg132=0 +tflag132=386 +initx132=0 +inity132=0 +minx132=0 +miny132=0 +maxx132=0 +maxy132=0 +posx132=50 +posy132=50 +sizx132=800 +sizy132=600 +title133=Resident Evil +path133=D:\Games\Resident Evil\residentevil.patched.exe +module133= +ver133=1 +flag133=134217827 +flagg133=128 +tflag133=2 +initx133=0 +inity133=0 +minx133=0 +miny133=0 +maxx133=0 +maxy133=0 +posx133=50 +posy133=50 +sizx133=800 +sizy133=600 +title134=Return to Castle Wolfenstein +path134=D:\Games\Return to Castle Wolfenstein (2001)\Return to Castle Wolfenstein\WolfSP.exe +module134= +ver134=0 +flag134=134234114 +flagg134=212992 +tflag134=256 +initx134=0 +inity134=0 +minx134=0 +miny134=0 +maxx134=0 +maxy134=0 +posx134=50 +posy134=50 +sizx134=800 +sizy134=600 +title135=Re-Volt +path135=C:\Games\Re-Volt\REVOLT.EXE +module135= +ver135=0 +flag135=134217792 +flagg135=0 +tflag135=0 +initx135=0 +inity135=0 +minx135=0 +miny135=0 +maxx135=0 +maxy135=0 +posx135=50 +posy135=50 +sizx135=800 +sizy135=600 +title136=Road Rash +path136=D:\Games\Road Rash\ROADRASH\ROADRASH.EXE +module136= +ver136=0 +flag136=134217730 +flagg136=0 +tflag136=386 +initx136=0 +inity136=0 +minx136=0 +miny136=0 +maxx136=0 +maxy136=0 +posx136=50 +posy136=50 +sizx136=800 +sizy136=600 +title137=Road Rash Demo +path137=D:\Games\RoadRash DEMO\DEMORASH.EXE +module137= +ver137=0 +flag137=134218242 +flagg137=0 +tflag137=258 +initx137=0 +inity137=0 +minx137=0 +miny137=0 +maxx137=0 +maxy137=0 +posx137=50 +posy137=50 +sizx137=800 +sizy137=600 +title138=RollerCoaster Tycoon 2 Mini Game +path138=C:\Games\RollerCoaster Tycoon 2 Mini Game\rct2.exe +module138= +ver138=1 +flag138=536870946 +flagg138=0 +tflag138=0 +initx138=0 +inity138=0 +minx138=0 +miny138=0 +maxx138=0 +maxy138=0 +posx138=0 +posy138=0 +sizx138=800 +sizy138=600 +title139=Sega Rally 2 Championship +path139=C:\Games\Sega Rally 2 Championship\SEGA RALLY 2.exe +module139= +ver139=1 +flag139=268435488 +flagg139=2 +tflag139=0 +initx139=0 +inity139=0 +minx139=0 +miny139=0 +maxx139=0 +maxy139=0 +posx139=0 +posy139=0 +sizx139=800 +sizy139=600 +title140=Sentinel Returns +path140=D:\Games\Sentinel Returns\Sentinel.exe +module140= +ver140=1 +flag140=3 +flagg140=0 +tflag140=0 +initx140=0 +inity140=0 +minx140=0 +miny140=0 +maxx140=0 +maxy140=0 +posx140=50 +posy140=50 +sizx140=800 +sizy140=600 +title141=Shadow Master (TBD) +path141=C:\Games\Shadow Master\rmg.exe +module141= +ver141=1 +flag141=32 +flagg141=256 +tflag141=450 +initx141=0 +inity141=0 +minx141=0 +miny141=0 +maxx141=0 +maxy141=0 +posx141=50 +posy141=50 +sizx141=800 +sizy141=600 +title142=Sid Meier's SimGolf Demo +path142=C:\Games\Sid Meier's SimGolf Demo\golf.exe +module142=jgl.dll +ver142=0 +flag142=33554434 +flagg142=0 +tflag142=2 +initx142=0 +inity142=0 +minx142=0 +miny142=0 +maxx142=0 +maxy142=0 +posx142=50 +posy142=50 +sizx142=800 +sizy142=600 +title143=Sin, Wages of (sw renderer) +path143=D:\Games\sin\sin.exe +module143=ref_gl.dll ref_soft.dll +ver143=10 +flag143=402670082 +flagg143=513 +tflag143=386 +initx143=0 +inity143=0 +minx143=0 +miny143=0 +maxx143=0 +maxy143=0 +posx143=50 +posy143=50 +sizx143=800 +sizy143=600 +title144=SleepWalker +path144=C:\Games\SleepWalker\Sleepy.exe +module144= +ver144=0 +flag144=301989954 +flagg144=0 +tflag144=198 +initx144=0 +inity144=0 +minx144=0 +miny144=0 +maxx144=0 +maxy144=0 +posx144=50 +posy144=50 +sizx144=800 +sizy144=600 +title145=SnowBoard Racer +path145=C:\Games\Snowboard Racer\SnowBoard.exe +module145= +ver145=0 +flag145=268443681 +flagg145=0 +tflag145=0 +initx145=0 +inity145=0 +minx145=0 +miny145=0 +maxx145=0 +maxy145=0 +posx145=50 +posy145=50 +sizx145=800 +sizy145=600 +title146=Solaris (~BAD) +path146=c:\Games\Solaris\solaris.exe +module146= +ver146=7 +flag146=973078627 +flagg146=1 +tflag146=2 +initx146=0 +inity146=0 +minx146=0 +miny146=0 +maxx146=0 +maxy146=0 +posx146=50 +posy146=50 +sizx146=800 +sizy146=600 +title147=Soldiers at War +path147=D:\Games\Soldiers at War\SAW_Game.exe +module147= +ver147=0 +flag147=671359010 +flagg147=64 +tflag147=0 +initx147=0 +inity147=0 +minx147=0 +miny147=0 +maxx147=0 +maxy147=0 +posx147=50 +posy147=50 +sizx147=640 +sizy147=480 +title148=Sonic 3 +path148=C:\Games\Sonic 3 + Sonic et Knuckles\Sonic 3\SONIC3K.EXE +module148= +ver148=1 +flag148=546 +flagg148=0 +tflag148=0 +initx148=0 +inity148=0 +minx148=0 +miny148=0 +maxx148=0 +maxy148=0 +posx148=50 +posy148=50 +sizx148=800 +sizy148=600 +title149=Sonic 3D Blast +path149=C:\Games\Sonic3D\pcsonic.exe +module149= +ver149=0 +flag149=134217762 +flagg149=0 +tflag149=0 +initx149=0 +inity149=0 +minx149=0 +miny149=0 +maxx149=0 +maxy149=0 +posx149=50 +posy149=50 +sizx149=800 +sizy149=600 +title150=Sonic R +path150=C:\Games\SonicR\sonicr.exe +module150= +ver150=0 +flag150=8288 +flagg150=0 +tflag150=0 +initx150=0 +inity150=0 +minx150=0 +miny150=0 +maxx150=0 +maxy150=0 +posx150=50 +posy150=50 +sizx150=800 +sizy150=600 +title151=Soulbringer +path151=C:\Games\SoulBringer\SoulbringeVCnoeax.exe +module151= +ver151=0 +flag151=143024174 +flagg151=0 +tflag151=0 +initx151=0 +inity151=0 +minx151=0 +miny151=0 +maxx151=0 +maxy151=0 +posx151=50 +posy151=50 +sizx151=800 +sizy151=600 +title152=Speedboat Attack (BAD) +path152=C:\Games\Speedboat Attack\SBOAT.EXE +module152= +ver152=0 +flag152=541073954 +flagg152=0 +tflag152=2 +initx152=0 +inity152=0 +minx152=0 +miny152=0 +maxx152=0 +maxy152=0 +posx152=50 +posy152=50 +sizx152=800 +sizy152=600 +title153=Star trek Klingon Honor Guard +path153=D:\Games\Star trek Klingon Honor Guard\System\Khg.exe +module153=OGIDrv.dll +ver153=10 +flag153=0 +flagg153=131585 +tflag153=387 +initx153=0 +inity153=0 +minx153=0 +miny153=0 +maxx153=0 +maxy153=0 +posx153=50 +posy153=50 +sizx153=800 +sizy153=600 +title154=Star Wars Episode 1 Racer +path154=C:\Games\sw racer\SWEP1RCR.EXE +module154= +ver154=0 +flag154=142606368 +flagg154=0 +tflag154=0 +initx154=0 +inity154=0 +minx154=0 +miny154=0 +maxx154=0 +maxy154=0 +posx154=50 +posy154=50 +sizx154=800 +sizy154=600 +title155=Star Wars Jedi Knight Jedi Academy +path155=D:\Games\Star_Wars_Jedi_Knight_Jedi_Academy\GameData\jasp.exe +module155= +ver155=10 +flag155=0 +flagg155=65536 +tflag155=2 +initx155=0 +inity155=0 +minx155=0 +miny155=0 +maxx155=0 +maxy155=0 +posx155=50 +posy155=50 +sizx155=800 +sizy155=600 +title156=Star Wars: Jedi Knight +path156=C:\Games\Jedi Knight\Jedi Knight\JK.EXE +module156= +ver156=0 +flag156=8226 +flagg156=0 +tflag156=0 +initx156=0 +inity156=0 +minx156=0 +miny156=0 +maxx156=0 +maxy156=0 +posx156=50 +posy156=50 +sizx156=800 +sizy156=600 +title157=Star Wars: the Gungan Frontier +path157=C:\Games\sw the gungan frontier\Gungan Frontier.exe +module157= +ver157=1 +flag157=402915362 +flagg157=512 +tflag157=0 +initx157=0 +inity157=0 +minx157=0 +miny157=0 +maxx157=0 +maxy157=0 +posx157=0 +posy157=0 +sizx157=800 +sizy157=600 +title158=Starship Troopers +path158=C:\Games\Starship Troopers - Terran Ascendancy\stta\StarshipTroopers.exe +module158= +ver158=1 +flag158=32 +flagg158=0 +tflag158=0 +initx158=0 +inity158=0 +minx158=0 +miny158=0 +maxx158=0 +maxy158=0 +posx158=50 +posy158=50 +sizx158=800 +sizy158=600 +title159=Starshot Space Circus +path159=D:\SpaceCircus.exe +module159= +ver159=0 +flag159=66 +flagg159=0 +tflag159=0 +initx159=0 +inity159=0 +minx159=0 +miny159=0 +maxx159=0 +maxy159=0 +posx159=50 +posy159=50 +sizx159=800 +sizy159=600 +title160=Stronghold Demo +path160=C:\Games\Firefly Studios' Stronghold - Demo\Stronghold Demo.exe +module160= +ver160=0 +flag160=98 +flagg160=0 +tflag160=0 +initx160=0 +inity160=0 +minx160=0 +miny160=0 +maxx160=0 +maxy160=0 +posx160=50 +posy160=50 +sizx160=800 +sizy160=600 +title161=Sub Culture +path161=C:\Games\Sub Culture\sc.exe +module161= +ver161=0 +flag161=66 +flagg161=256 +tflag161=10 +initx161=50 +inity161=50 +minx161=50 +miny161=50 +maxx161=800 +maxy161=600 +posx161=50 +posy161=50 +sizx161=800 +sizy161=600 +title162=Superbike 2001 +path162=C:\Games\Superbike 2001\Sbk2001.exe +module162= +ver162=1 +flag162=536887332 +flagg162=0 +tflag162=0 +initx162=0 +inity162=0 +minx162=0 +miny162=0 +maxx162=0 +maxy162=0 +posx162=50 +posy162=50 +sizx162=800 +sizy162=600 +title163=Syberia 2 Demo +path163=C:\Games\Syberia 2 Demo\Syberia2Demo.exe +module163= +ver163=8 +flag163=536887332 +flagg163=0 +tflag163=0 +initx163=0 +inity163=0 +minx163=0 +miny163=0 +maxx163=0 +maxy163=0 +posx163=50 +posy163=50 +sizx163=800 +sizy163=600 +title164=Syberia Demo +path164=C:\Games\SyberiaDemo\SyberiaDemo.exe +module164= +ver164=1 +flag164=536887332 +flagg164=0 +tflag164=0 +initx164=0 +inity164=0 +minx164=0 +miny164=0 +maxx164=0 +maxy164=0 +posx164=50 +posy164=50 +sizx164=800 +sizy164=600 +title165=System Shock 2 (BAD!!!) +path165=C:\Games\Sys Shock II\Shock2.exe +module165= +ver165=1 +flag165=0 +flagg165=64 +tflag165=0 +initx165=0 +inity165=0 +minx165=0 +miny165=0 +maxx165=0 +maxy165=0 +posx165=50 +posy165=50 +sizx165=800 +sizy165=600 +title166=Test Drive 4 +path166=D:\Games\Test Drive 4\td4.EXE +module166= +ver166=0 +flag166=-2013265885 +flagg166=65554 +tflag166=2 +initx166=0 +inity166=0 +minx166=0 +miny166=0 +maxx166=0 +maxy166=0 +posx166=50 +posy166=50 +sizx166=800 +sizy166=600 +title167=The Nations Demo +path167=C:\Games\The Nations Demo\bin\Game.exe +module167= +ver167=1 +flag167=402661920 +flagg167=256 +tflag167=0 +initx167=0 +inity167=0 +minx167=0 +miny167=0 +maxx167=0 +maxy167=0 +posx167=50 +posy167=50 +sizx167=800 +sizy167=600 +title168=The Sims +path168=D:\Games\sims\Sims.exe +module168= +ver168=0 +flag168=134226976 +flagg168=65536 +tflag168=2 +initx168=0 +inity168=0 +minx168=0 +miny168=0 +maxx168=0 +maxy168=0 +posx168=50 +posy168=50 +sizx168=800 +sizy168=600 +title169=Thief the Dark Project (FRE) +path169=C:\Games\thief\game\thieffixed.exe +module169= +ver169=1 +flag169=16390 +flagg169=0 +tflag169=0 +initx169=0 +inity169=0 +minx169=0 +miny169=0 +maxx169=0 +maxy169=0 +posx169=50 +posy169=50 +sizx169=800 +sizy169=600 +title170=TinTin: Prisoners of the Sun +path170=C:\Games\tintin\TINTINW.EXE +module170= +ver170=0 +flag170=34 +flagg170=0 +tflag170=2 +initx170=0 +inity170=0 +minx170=0 +miny170=0 +maxx170=0 +maxy170=0 +posx170=50 +posy170=50 +sizx170=800 +sizy170=600 +title171=Tintoy (BAD gfx) +path171=C:\Games\Tintoy\Tintoy.exe +module171= +ver171=0 +flag171=546 +flagg171=256 +tflag171=258 +initx171=0 +inity171=0 +minx171=0 +miny171=0 +maxx171=0 +maxy171=0 +posx171=50 +posy171=50 +sizx171=800 +sizy171=600 +title172=Tomb Raider - Anniversary +path172=C:\Games\Tomb Raider - Anniversary\tra.exe +module172= +ver172=9 +flag172=0 +flagg172=256 +tflag172=2 +initx172=0 +inity172=0 +minx172=0 +miny172=0 +maxx172=0 +maxy172=0 +posx172=50 +posy172=50 +sizx172=800 +sizy172=600 +title173=Tomb Raider 2 the Golden Mask +path173=D:\Games\TR2 Golden Mask\T2GOLD.EXE +module173= +ver173=0 +flag173=570425378 +flagg173=1064960 +tflag173=258 +initx173=0 +inity173=0 +minx173=0 +miny173=0 +maxx173=0 +maxy173=0 +posx173=50 +posy173=50 +sizx173=800 +sizy173=600 +title174=Tomb Raider 3 Demo +path174=C:\Games\Tomb Raider 3 - The Lost Artifact Demo\tr3gold.exe +module174= +ver174=1 +flag174=369098848 +flagg174=0 +tflag174=258 +initx174=0 +inity174=0 +minx174=0 +miny174=0 +maxx174=0 +maxy174=0 +posx174=50 +posy174=50 +sizx174=800 +sizy174=600 +title175=Tomb Raider 4 Demo +path175=C:\Games\Tomb Raider 4 - The Last Revelation (Demo)\tomb4.patched.exe +module175= +ver175=0 +flag175=234881056 +flagg175=16 +tflag175=258 +initx175=0 +inity175=0 +minx175=0 +miny175=0 +maxx175=0 +maxy175=0 +posx175=50 +posy175=50 +sizx175=800 +sizy175=600 +title176=Total Annihilation Kingdoms +path176=D:\Games\Total Annihilation Kingdoms\Kingdoms.exe +module176= +ver176=0 +flag176=134234146 +flagg176=0 +tflag176=0 +initx176=0 +inity176=0 +minx176=0 +miny176=0 +maxx176=0 +maxy176=0 +posx176=50 +posy176=50 +sizx176=800 +sizy176=600 +title177=Total Soccer 2000 +path177=D:\Games\Total Soccer 2000\Total Soccer 2000\SOCCERDX.EXE +module177= +ver177=1 +flag177=33554434 +flagg177=1069056 +tflag177=0 +initx177=0 +inity177=0 +minx177=0 +miny177=0 +maxx177=0 +maxy177=0 +posx177=50 +posy177=50 +sizx177=800 +sizy177=600 +title178=Ultim@te Race Pro +path178=C:\Games\Ultim@te race pro\Ultim@te Race Pro.exe +module178= +ver178=0 +flag178=570425440 +flagg178=256 +tflag178=0 +initx178=0 +inity178=0 +minx178=0 +miny178=0 +maxx178=0 +maxy178=0 +posx178=50 +posy178=50 +sizx178=800 +sizy178=600 +title179=Uprising - Join or Die +path179=D:\Games\Uprising\uprising.exe +module179= +ver179=0 +flag179=-2013265882 +flagg179=18 +tflag179=0 +initx179=0 +inity179=0 +minx179=0 +miny179=0 +maxx179=0 +maxy179=0 +posx179=50 +posy179=50 +sizx179=800 +sizy179=600 +title180=Urban Assault +path180=D:\Games\Urban Assault\UA.EXE +module180= +ver180=0 +flag180=671236130 +flagg180=256 +tflag180=258 +initx180=0 +inity180=0 +minx180=0 +miny180=0 +maxx180=0 +maxy180=0 +posx180=50 +posy180=50 +sizx180=800 +sizy180=600 +title181=Warcraft 2 Battlenet Edition +path181=D:\Games\Warcraft 2\Warcraft II BNE.exe +module181= +ver181=0 +flag181=268452003 +flagg181=16 +tflag181=258 +initx181=0 +inity181=0 +minx181=0 +miny181=0 +maxx181=0 +maxy181=0 +posx181=50 +posy181=50 +sizx181=800 +sizy181=600 +title182=WarHammer Rites of War +path182=C:\Games\Rites of War\RoW.exe +module182= +ver182=0 +flag182=134217760 +flagg182=128 +tflag182=0 +initx182=0 +inity182=0 +minx182=0 +miny182=0 +maxx182=0 +maxy182=0 +posx182=50 +posy182=50 +sizx182=800 +sizy182=600 +title183=Warlords 3 +path183=D:\Games\WARLORDS3\Darklord.exe +module183= +ver183=0 +flag183=-2013265374 +flagg183=32 +tflag183=2 +initx183=0 +inity183=0 +minx183=0 +miny183=0 +maxx183=0 +maxy183=0 +posx183=50 +posy183=50 +sizx183=0 +sizy183=0 +title184=WarTorn +path184=C:\Games\WarTorn\W.exe +module184= +ver184=0 +flag184=32 +flagg184=0 +tflag184=0 +initx184=0 +inity184=0 +minx184=0 +miny184=0 +maxx184=0 +maxy184=0 +posx184=50 +posy184=50 +sizx184=800 +sizy184=600 +title185=WarWind +path185=C:\Games\WarWind\WW.EXE +module185= +ver185=0 +flag185=16418 +flagg185=81936 +tflag185=0 +initx185=0 +inity185=0 +minx185=0 +miny185=0 +maxx185=0 +maxy185=0 +posx185=50 +posy185=50 +sizx185=800 +sizy185=600 +title186=Worms Armageddon Demo (BAD!!!) +path186=C:\Games\Worms Armageddon Demo\WaDemo.exe +module186= +ver186=1 +flag186=939524099 +flagg186=8 +tflag186=2 +initx186=0 +inity186=0 +minx186=0 +miny186=0 +maxx186=0 +maxy186=0 +posx186=0 +posy186=0 +sizx186=0 +sizy186=0 +title187=Worms World Party +path187=D:\Games\Worms World Party\wwp.exe +module187= +ver187=1 +flag187=8388610 +flagg187=0 +tflag187=0 +initx187=0 +inity187=0 +minx187=0 +miny187=0 +maxx187=0 +maxy187=0 +posx187=50 +posy187=50 +sizx187=800 +sizy187=600 +maxfps0=0 +maxfps1=40 +maxfps2=0 +maxfps3=0 +maxfps4=0 +maxfps5=0 +maxfps6=10 +maxfps7=40 +maxfps8=0 +maxfps9=0 +maxfps10=0 +maxfps11=0 +maxfps12=0 +maxfps13=0 +maxfps14=0 +maxfps15=0 +maxfps16=0 +maxfps17=0 +maxfps18=0 +maxfps19=0 +maxfps20=0 +maxfps21=0 +maxfps22=0 +maxfps23=0 +maxfps24=0 +maxfps25=0 +maxfps26=0 +maxfps27=0 +maxfps28=0 +maxfps29=0 +maxfps30=0 +maxfps31=0 +maxfps32=0 +maxfps33=0 +maxfps34=0 +maxfps35=0 +maxfps36=0 +maxfps37=0 +maxfps38=0 +maxfps39=0 +maxfps40=0 +maxfps41=0 +maxfps42=0 +maxfps43=0 +maxfps44=0 +maxfps45=0 +maxfps46=0 +maxfps47=0 +maxfps48=0 +maxfps49=0 +maxfps50=0 +maxfps51=0 +maxfps52=0 +maxfps53=0 +maxfps54=0 +maxfps55=0 +maxfps56=100 +maxfps57=0 +maxfps58=500 +maxfps59=0 +maxfps60=0 +maxfps61=0 +maxfps62=0 +maxfps63=0 +maxfps64=0 +maxfps65=0 +maxfps66=0 +maxfps67=0 +maxfps68=0 +maxfps69=0 +maxfps70=0 +maxfps71=0 +maxfps72=0 +maxfps73=0 +maxfps74=0 +maxfps75=0 +maxfps76=0 +maxfps77=0 +maxfps78=0 +maxfps79=0 +maxfps80=0 +maxfps81=0 +maxfps82=0 +maxfps83=0 +maxfps84=0 +maxfps85=0 +maxfps86=0 +maxfps87=50 +maxfps88=0 +maxfps89=0 +maxfps90=25 +maxfps91=0 +maxfps92=0 +maxfps93=0 +maxfps94=0 +maxfps95=0 +maxfps96=0 +maxfps97=100 +maxfps98=0 +maxfps99=0 +maxfps100=0 +maxfps101=0 +maxfps102=0 +maxfps103=0 +maxfps104=0 +maxfps105=0 +maxfps106=0 +maxfps107=0 +maxfps108=0 +maxfps109=0 +maxfps110=0 +maxfps111=0 +maxfps112=0 +maxfps113=0 +maxfps114=0 +maxfps115=0 +maxfps116=0 +maxfps117=0 +maxfps118=0 +maxfps119=0 +maxfps120=0 +maxfps121=0 +maxfps122=0 +maxfps123=0 +maxfps124=0 +maxfps125=0 +maxfps126=0 +maxfps127=0 +maxfps128=0 +maxfps129=0 +maxfps130=0 +maxfps131=0 +maxfps132=0 +maxfps133=0 +maxfps134=50 +maxfps135=0 +maxfps136=0 +maxfps137=0 +maxfps138=0 +maxfps139=0 +maxfps140=0 +maxfps141=0 +maxfps142=0 +maxfps143=0 +maxfps144=0 +maxfps145=0 +maxfps146=0 +maxfps147=0 +maxfps148=0 +maxfps149=0 +maxfps150=0 +maxfps151=0 +maxfps152=0 +maxfps153=0 +maxfps154=0 +maxfps155=0 +maxfps156=0 +maxfps157=0 +maxfps158=0 +maxfps159=0 +maxfps160=0 +maxfps161=0 +maxfps162=0 +maxfps163=0 +maxfps164=0 +maxfps165=0 +maxfps166=0 +maxfps167=0 +maxfps168=0 +maxfps169=0 +maxfps170=0 +maxfps171=0 +maxfps172=0 +maxfps173=0 +maxfps174=0 +maxfps175=0 +maxfps176=0 +maxfps177=200 +maxfps178=0 +maxfps179=0 +maxfps180=0 +maxfps181=40 +maxfps182=0 +maxfps183=0 +maxfps184=0 +maxfps185=0 +maxfps186=0 +maxfps187=0 +title188=Worms World Party Demo (BAD) +path188=C:\Games\WWP Demo\wwp.exe +module188=MFC42.DLL ltkrn10N.dll +ver188=1 +flag188=406847491 +flagg188=8 +tflag188=2 +initx188=0 +inity188=0 +minx188=0 +miny188=0 +maxx188=0 +maxy188=0 +posx188=0 +posy188=0 +sizx188=0 +maxfps188=0 +opengllib0= +initts0=-8 +opengllib1= +initts1=-7 +opengllib2= +initts2=-7 +opengllib3= +initts3=0 +opengllib4= +initts4=0 +opengllib5= +initts5=0 +opengllib6= +initts6=0 +opengllib7= +initts7=0 +opengllib8= +initts8=0 +opengllib9= +initts9=0 +opengllib10= +initts10=0 +opengllib11= +initts11=0 +opengllib12= +initts12=0 +opengllib13= +initts13=0 +opengllib14= +initts14=0 +opengllib15= +initts15=0 +opengllib16= +initts16=0 +opengllib17= +initts17=0 +opengllib18= +initts18=0 +opengllib19= +initts19=0 +opengllib20= +initts20=0 +opengllib21= +initts21=0 +opengllib22= +initts22=0 +opengllib23= +initts23=0 +opengllib24= +initts24=0 +opengllib25= +initts25=0 +opengllib26= +initts26=0 +opengllib27= +initts27=0 +opengllib28= +initts28=0 +opengllib29= +initts29=0 +opengllib30= +initts30=0 +opengllib31= +initts31=0 +opengllib32= +initts32=0 +opengllib33= +initts33=0 +opengllib34= +initts34=0 +opengllib35= +initts35=0 +opengllib36= +initts36=0 +opengllib37= +initts37=0 +opengllib38= +initts38=0 +opengllib39= +initts39=0 +opengllib40= +initts40=0 +opengllib41= +initts41=0 +opengllib42= +initts42=0 +opengllib43= +initts43=0 +opengllib44= +initts44=0 +opengllib45= +initts45=0 +opengllib46= +initts46=0 +opengllib47= +initts47=0 +opengllib48= +initts48=0 +opengllib49= +initts49=0 +opengllib50= +initts50=0 +opengllib51= +initts51=0 +opengllib52= +initts52=0 +opengllib53= +initts53=0 +opengllib54= +initts54=0 +opengllib55= +initts55=0 +opengllib56= +initts56=-5 +opengllib57= +initts57=0 +opengllib58= +initts58=0 +opengllib59= +initts59=0 +opengllib60= +initts60=0 +opengllib61= +initts61=0 +opengllib62= +initts62=0 +opengllib63= +initts63=0 +opengllib64= +initts64=0 +opengllib65= +initts65=0 +opengllib66= +initts66=0 +opengllib67= +initts67=0 +opengllib68= +initts68=0 +opengllib69= +initts69=0 +opengllib70= +initts70=0 +opengllib71= +initts71=0 +opengllib72= +initts72=0 +opengllib73= +initts73=0 +opengllib74= +initts74=0 +opengllib75= +initts75=0 +opengllib76= +initts76=0 +opengllib77= +initts77=0 +opengllib78= +initts78=0 +opengllib79= +initts79=0 +opengllib80= +initts80=0 +opengllib81= +initts81=0 +opengllib82= +initts82=0 +opengllib83= +initts83=4 +opengllib84= +initts84=0 +opengllib85= +initts85=0 +opengllib86= +initts86=0 +opengllib87= +initts87=8 +opengllib88= +initts88=8 +opengllib89= +initts89=0 +opengllib90= +initts90=1 +opengllib91= +initts91=0 +opengllib92= +initts92=0 +opengllib93= +initts93=0 +opengllib94= +initts94=0 +opengllib95= +initts95=0 +opengllib96= +initts96=0 +opengllib97= +initts97=3 +opengllib98= +initts98=0 +opengllib99= +initts99=0 +opengllib100= +initts100=0 +opengllib101= +initts101=0 +opengllib102= +initts102=0 +opengllib103= +initts103=0 +opengllib104= +initts104=0 +opengllib105= +initts105=0 +opengllib106= +initts106=0 +opengllib107= +initts107=0 +opengllib108= +initts108=0 +opengllib109= +initts109=0 +opengllib110= +initts110=0 +opengllib111= +initts111=0 +opengllib112= +initts112=0 +opengllib113= +initts113=0 +opengllib114= +initts114=0 +opengllib115= +initts115=0 +opengllib116= +initts116=0 +opengllib117= +initts117=0 +opengllib118= +initts118=0 +opengllib119= +initts119=0 +opengllib120= +initts120=0 +opengllib121= +initts121=0 +opengllib122= +initts122=0 +opengllib123= +initts123=0 +opengllib124= +initts124=0 +opengllib125= +initts125=0 +opengllib126= +initts126=0 +opengllib127= +initts127=0 +opengllib128= +initts128=0 +opengllib129= +initts129=0 +opengllib130= +initts130=0 +opengllib131= +initts131=0 +opengllib132= +initts132=0 +opengllib133= +initts133=0 +opengllib134= +initts134=-4 +opengllib135= +initts135=0 +opengllib136= +initts136=0 +opengllib137= +initts137=0 +opengllib138= +initts138=0 +opengllib139= +initts139=0 +opengllib140= +initts140=0 +opengllib141= +initts141=0 +opengllib142= +initts142=0 +opengllib143= +initts143=0 +opengllib144= +initts144=0 +opengllib145= +initts145=0 +opengllib146= +initts146=0 +opengllib147= +initts147=0 +opengllib148= +initts148=0 +opengllib149= +initts149=0 +opengllib150= +initts150=0 +opengllib151= +initts151=0 +opengllib152= +initts152=0 +opengllib153= +initts153=0 +opengllib154= +initts154=0 +opengllib155= +initts155=0 +opengllib156= +initts156=0 +opengllib157= +initts157=0 +opengllib158= +initts158=0 +opengllib159= +initts159=0 +opengllib160= +initts160=0 +opengllib161= +initts161=0 +opengllib162= +initts162=0 +opengllib163= +initts163=0 +opengllib164= +initts164=0 +opengllib165= +initts165=0 +opengllib166= +initts166=-2 +opengllib167= +initts167=0 +opengllib168= +initts168=0 +opengllib169= +initts169=0 +opengllib170= +initts170=0 +opengllib171= +initts171=0 +opengllib172= +initts172=8 +opengllib173= +initts173=8 +opengllib174= +initts174=0 +opengllib175= +initts175=0 +opengllib176= +initts176=0 +opengllib177= +initts177=0 +opengllib178= +initts178=0 +opengllib179= +initts179=0 +opengllib180= +initts180=0 +opengllib181= +initts181=0 +opengllib182= +initts182=0 +opengllib183= +initts183=0 +opengllib184= +initts184=0 +opengllib185= +initts185=0 +opengllib186= +initts186=0 +opengllib187= +initts187=0 +opengllib188= +sizy188=0 +initts188=0 +title189=X-Com Enforcer +path189=C:\Games\X-Com Enforcer\System\xcom.exe +module189= +opengllib189= +ver189=1 +flag189=32 +flagg189=0 +tflag189=0 +initx189=0 +inity189=0 +minx189=0 +miny189=0 +maxx189=0 +maxy189=0 +posx189=0 +posy189=0 +sizx189=800 +sizy189=600 +maxfps189=0 +initts189=0 +title190=X-Com Interceptor +module190= +opengllib190= +path190=C:\Games\X-Com_Interceptor\X-COM Interceptor\Interceptor.exe +ver190=0 +flag190=16418 +flagg190=0 +tflag190=0 +initx190=0 +inity190=0 +minx190=0 +miny190=0 +maxx190=0 +maxy190=0 +posx190=50 +posy190=50 +sizx190=800 +sizy190=600 +maxfps190=0 +initts190=0 +title191=Z Steel Soldiers +path191=C:\Games\ZSteelSoldiers\Bin\z2.exe +module191= +opengllib191= +ver191=8 +flag191=805462020 +flagg191=0 +tflag191=0 +initx191=0 +inity191=0 +minx191=0 +miny191=0 +maxx191=0 +maxy191=0 +posx191=50 +posy191=50 +sizx191=800 +sizy191=600 +maxfps191=0 +initts191=0 +title192=Zax Alien Hunter +path192=C:\Games\ZaxDemo\Zax.exe +module192= +opengllib192= +ver192=0 +flag192=-1476386784 +flagg192=0 +tflag192=0 +initx192=0 +inity192=0 +minx192=0 +miny192=0 +maxx192=0 +maxy192=0 +posx192=50 +posy192=50 +sizx192=800 +sizy192=600 +maxfps192=0 +initts192=0 +title193=Zero Critical (BAD) +path193=C:\Games\zero_critical_-_satin_rift\ZEROCR.EXE +module193= +opengllib193= +ver193=0 +flag193=679477858 +flagg193=8 +tflag193=0 +initx193=0 +inity193=0 +minx193=0 +miny193=0 +maxx193=0 +maxy193=0 +posx193=0 +posy193=0 +sizx193=800 +sizy193=600 +maxfps193=0 +initts193=0 +title194=Zero Population Count +path194=C:\Games\ZPC\ZPC.EXE +module194= +opengllib194= +ver194=0 +flag194=1073741859 +flagg194=0 +tflag194=0 +initx194=0 +inity194=0 +minx194=0 +miny194=0 +maxx194=0 +maxy194=0 +posx194=0 +posy194=0 +sizx194=800 +sizy194=600 +maxfps194=0 +initts194=0 +title195=Zero Zone +path195=D:\ZZone\ZeroZone.exe +module195= +opengllib195= +ver195=0 +flag195=34 +flagg195=0 +tflag195=0 +initx195=0 +inity195=0 +minx195=0 +miny195=0 +maxx195=0 +maxy195=0 +posx195=50 +posy195=50 +sizx195=800 +sizy195=600 +maxfps195=0 +initts195=0 +title196=Zeus Poseidon +path196=C:\Games\Zeus-Poseidon\Zeus.exe +module196= +opengllib196= +ver196=0 +flag196=34 +flagg196=0 +tflag196=0 +initx196=0 +inity196=0 +minx196=0 +miny196=0 +maxx196=0 +maxy196=0 +posx196=50 +posy196=50 +sizx196=800 +sizy196=600 +maxfps196=0 +initts196=0 + +title197=Zoo Tycoon +path197=C:\Games\Zoo Tycoon\zoo.exe +module197= +opengllib197= +ver197=0 +flag197=-2013265886 +flagg197=0 +tflag197=0 +initx197=0 +inity197=0 +minx197=0 +miny197=0 +maxx197=0 +maxy197=0 +posx197=50 +posy197=50 +sizx197=800 +sizy197=600 +maxfps197=0 +initts197=0 +title198=Doom 95 +path198=D:\Games\Doom95\DOOM95.EXE +module198= +opengllib198= +ver198=0 +flag198=134217762 +flagg198=2113536 +tflag198=258 +initx198=0 +inity198=0 +minx198=0 +miny198=0 +maxx198=0 +maxy198=0 +posx198=50 +posy198=50 +sizx198=800 +sizy198=600 +maxfps198=20 +initts198=-9 +title199=Urban Assault CD +path199=D:\Games\Urban Assault CD\UA.EXE +module199= +opengllib199= +ver199=0 +flag199=671236130 +flagg199=33024 +tflag199=258 +initx199=0 +inity199=0 +minx199=0 +miny199=0 +maxx199=0 +maxy199=0 +posx199=50 +posy199=50 +sizx199=800 +sizy199=600 +maxfps199=0 +initts199=0 +title200=Starcraft +path200=D:\Games\Starcraft\StarCraft.exe +module200= +opengllib200= +ver200=0 +flag200=134234115 +flagg200=2179088 +tflag200=258 +initx200=0 +inity200=0 +minx200=0 +miny200=0 +maxx200=0 +maxy200=0 +posx200=50 +posy200=50 +sizx200=800 +sizy200=600 +maxfps200=0 +initts200=0 +title201=Battle Commander +path201=D:\Games\Battle Commander\bcommand.exe +module201= +opengllib201= +ver201=0 +flag201=134217794 +flagg201=0 +tflag201=2 +initx201=0 +inity201=0 +minx201=0 +miny201=0 +maxx201=0 +maxy201=0 +posx201=50 +posy201=50 +sizx201=800 +sizy201=600 +maxfps201=0 +initts201=0 +title202=Pandemonium 2 +path202=D:\Games\Pandemonium 2\pandy.exe +module202= +opengllib202= +ver202=0 +flag202=671219714 +flagg202=1 +tflag202=0 +initx202=0 +inity202=0 +minx202=0 +miny202=0 +maxx202=0 +maxy202=0 +posx202=50 +posy202=50 +sizx202=800 +sizy202=600 +maxfps202=0 +initts202=0 +title203=Pharaoh +path203=D:\Games\Pharaoh\Pharaoh.exe +module203= +opengllib203= +ver203=0 +flag203=1208483874 +flagg203=1048576 +tflag203=0 +initx203=0 +inity203=0 +minx203=0 +miny203=0 +maxx203=0 +maxy203=0 +posx203=50 +posy203=50 +sizx203=800 +sizy203=600 +maxfps203=0 +initts203=0 +title204=Postal +path204=D:\Games\Postal\POSTAL.EXE +module204= +opengllib204= +ver204=1 +flag204=671088643 +flagg204=65600 +tflag204=266 +initx204=0 +inity204=0 +minx204=0 +miny204=0 +maxx204=0 +maxy204=0 +posx204=50 +posy204=50 +sizx204=800 +sizy204=600 +maxfps204=0 +initts204=-3 +title205=Test Drive 5 (D3D) +path205=D:\Games\Test Drive 5\TD5_D3D.exe +module205= +opengllib205= +ver205=0 +flag205=536870944 +flagg205=0 +tflag205=263 +initx205=0 +inity205=0 +minx205=0 +miny205=0 +maxx205=0 +maxy205=0 +posx205=50 +posy205=50 +sizx205=800 +sizy205=600 +maxfps205=0 +initts205=0 +title206=Take no Prisoners +path206=D:\Games\Take no Prisoners\TNP.EXE +module206= +opengllib206= +ver206=0 +flag206=2 +flagg206=16777248 +tflag206=0 +initx206=0 +inity206=0 +minx206=0 +miny206=0 +maxx206=0 +maxy206=0 +posx206=50 +posy206=50 +sizx206=800 +sizy206=600 +maxfps206=0 +initts206=0 +title207=Fallen Heaven +path207=D:\Games\Fallen haven\Exe\FALLEN.EXE +module207=MFC42.dll MSVCRT.DLL mciavi32.dll +opengllib207= +ver207=1 +flag207=135004674 +flagg207=1049120 +tflag207=259 +initx207=0 +inity207=0 +minx207=0 +miny207=0 +maxx207=0 +maxy207=0 +posx207=50 +posy207=50 +sizx207=800 +sizy207=600 +maxfps207=0 +initts207=0 +title208=Grand Theft Auto 2 +path208=D:\Games\GTA2\gta2.exe +module208=binkw32 d3ddll +opengllib208= +ver208=0 +flag208=671096866 +flagg208=1048576 +tflag208=3 +initx208=0 +inity208=0 +minx208=0 +miny208=0 +maxx208=0 +maxy208=0 +posx208=50 +posy208=50 +sizx208=400 +sizy208=300 +maxfps208=0 +initts208=0 +title209=Grand Prix Legends MAX +module209= +opengllib209= +path209=D:\Games\Grand Prix Legends MAX\gpl.exe +ver209=7 +flag209=537001986 +flagg209=134217729 +tflag209=3 +initx209=0 +inity209=0 +minx209=0 +miny209=0 +maxx209=0 +maxy209=0 +posx209=50 +posy209=50 +sizx209=800 +sizy209=600 +maxfps209=0 +initts209=0 +title210=688I Hunter Killer +path210=D:\Games\688\688I_HK.EXE +module210= +opengllib210= +ver210=0 +flag210=134479906 +flagg210=134217728 +tflag210=3 +initx210=0 +inity210=0 +minx210=0 +miny210=0 +maxx210=0 +maxy210=0 +posx210=50 +posy210=50 +sizx210=640 +sizy210=480 +maxfps210=0 +initts210=0 +title211=Gruntz +path211=D:\Games\gruntz\GRUNTZ.EXE +module211= +opengllib211= +ver211=0 +flag211=34 +flagg211=134217728 +tflag211=0 +initx211=0 +inity211=0 +minx211=0 +miny211=0 +maxx211=0 +maxy211=0 +posx211=50 +posy211=50 +sizx211=800 +sizy211=600 +maxfps211=0 +initts211=0 +title212=Grand Touring +path212=D:\Games\Grand Touring\gt.exe +module212= +opengllib212= +ver212=0 +flag212=16388 +flagg212=134283264 +tflag212=275 +initx212=0 +inity212=0 +minx212=0 +miny212=0 +maxx212=0 +maxy212=0 +posx212=50 +posy212=50 +sizx212=400 +sizy212=300 +maxfps212=0 +initts212=8 +title213=Gunman Chronicles +path213=D:\Games\Gunman\gunman.exe +module213= +opengllib213= +ver213=0 +flag213=0 +flagg213=134348800 +tflag213=0 +initx213=0 +inity213=0 +minx213=0 +miny213=0 +maxx213=0 +maxy213=0 +posx213=0 +posy213=0 +sizx213=400 +sizy213=300 +maxfps213=0 +initts213=0 +title214=Nocturne +path214=D:\Games\Nocturne\nocturne.exe +module214= +opengllib214= +ver214=0 +flag214=2 +flagg214=402653264 +tflag214=387 +initx214=0 +inity214=0 +minx214=0 +miny214=0 +maxx214=0 +maxy214=0 +posx214=50 +posy214=50 +sizx214=400 +sizy214=300 +maxfps214=0 +initts214=0 +title215=Koplio +path215=D:\Games\Koplio\KOPLIO.exe +module215= +opengllib215= +ver215=0 +flag215=545259520 +flagg215=134217729 +tflag215=0 +initx215=0 +inity215=0 +minx215=0 +miny215=0 +maxx215=0 +maxy215=0 +posx215=50 +posy215=50 +sizx215=800 +sizy215=600 +maxfps215=0 +initts215=0 +title216=Nightmare Ned +path216=D:\Games\Ned\NITENED.EXE +module216= +opengllib216= +ver216=0 +flag216=537395202 +flagg216=135266305 +tflag216=0 +initx216=0 +inity216=0 +minx216=0 +miny216=0 +maxx216=0 +maxy216=0 +posx216=0 +posy216=0 +sizx216=800 +sizy216=600 +maxfps216=0 +initts216=0 +title217=Rollcage +path217=D:\Games\Rollcage\Direct3D\Rollcage.exe +module217= +opengllib217= +ver217=0 +flag217=268698112 +flagg217=134283264 +tflag217=387 +initx217=0 +inity217=0 +minx217=0 +miny217=0 +maxx217=0 +maxy217=0 +posx217=50 +posy217=50 +sizx217=800 +sizy217=600 +maxfps217=0 +initts217=3 +title218=Rogue Spear (BAD) +module218= +opengllib218= +path218=D:\Games\Rogue Spear\RogueSpear.exe +ver218=1 +flag218=16388 +flagg218=134217984 +tflag218=2 +initx218=0 +inity218=0 +minx218=0 +miny218=0 +maxx218=0 +maxy218=0 +posx218=50 +posy218=50 +sizx218=400 +sizy218=300 +maxfps218=0 +initts218=0 +title219=Black Thorn +path219=D:\Games\BlackThorn\BlackThorn.exe +module219= +opengllib219= +ver219=0 +flag219=0 +flagg219=134217984 +tflag219=66 +initx219=0 +inity219=0 +minx219=0 +miny219=0 +maxx219=0 +maxy219=0 +posx219=50 +posy219=50 +sizx219=800 +sizy219=600 +maxfps219=0 +initts219=0 +title220=Wargames (demo) +path220=D:\Games\Wargames\wargames.exe +module220= +opengllib220= +ver220=0 +flag220=268435618 +flagg220=134217728 +tflag220=0 +initx220=0 +inity220=0 +minx220=0 +miny220=0 +maxx220=0 +maxy220=0 +posx220=50 +posy220=50 +sizx220=800 +sizy220=600 +maxfps220=0 +initts220=0 diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt index 1c303e9..80587bd 100644 --- a/build/readme-relnotes.txt +++ b/build/readme-relnotes.txt @@ -60,3 +60,15 @@ GUI: Tabbed setup panel. More space for more future options. DLL: (optional) splash screen probably, some regression bugs.... +v2.02.13 +Added decoding of WINDOWPOS.flags field in trace log +revised whole hooking procedures to use HMODULE handle instead of module name +Added WM_GETMINMAXINFO and WM_NCCALCSIZE handling in WinProcess hook +Attempt to handle double buffering through surface attach to backbuffer (???) +Fixed CHILD window positioning for BIG windows in CreateWindowExA hook +Added GlobalMemoryStatus hook to fix huge values when value exceeds DWORD range. Fixes Nocturne intro warning message. + +V2.02.14 +Started dll injection to handle startup code +Fixed directx CreateSurface hook to fix "Wargames" error in emulated mode +Fixed directx SetClipper hook to properly handle backbuffer clipping and fix "Wargames" clipping problems diff --git a/dll/dxhelper.cpp b/dll/dxhelper.cpp index 9a934f6..383fe0f 100644 --- a/dll/dxhelper.cpp +++ b/dll/dxhelper.cpp @@ -961,3 +961,24 @@ char *ExplainDDEnumerateFlags(DWORD c) return "???"; } +char *ExplainWPFlags(DWORD c) +{ + static char eb[256]; + unsigned int l; + strcpy(eb,"SWP_"); + if (c & SWP_NOSIZE) strcat(eb, "NOSIZE+"); + if (c & SWP_NOMOVE) strcat(eb, "NOMOVE+"); + if (c & SWP_NOZORDER) strcat(eb, "NOZORDER+"); + if (c & SWP_NOREDRAW) strcat(eb, "NOREDRAW+"); + if (c & SWP_NOACTIVATE) strcat(eb, "NOACTIVATE+"); + if (c & SWP_FRAMECHANGED) strcat(eb, "FRAMECHANGED+"); + if (c & SWP_SHOWWINDOW) strcat(eb, "SHOWWINDOW+"); + if (c & SWP_HIDEWINDOW) strcat(eb, "HIDEWINDOW+"); + if (c & SWP_NOCOPYBITS) strcat(eb, "NOCOPYBITS+"); + if (c & SWP_NOOWNERZORDER) strcat(eb, "NOOWNERZORDER+"); + if (c & SWP_NOSENDCHANGING) strcat(eb, "NOSENDCHANGING+"); + l=strlen(eb); + if (l>strlen("SWP_")) eb[l-1]=0; // delete last '+' if any + else strcpy(eb,"NULL"); + return(eb); +} diff --git a/dll/dxhelper.h b/dll/dxhelper.h index 23713ec..e3dcbc4 100644 --- a/dll/dxhelper.h +++ b/dll/dxhelper.h @@ -28,3 +28,4 @@ extern char *ExplainROP(DWORD); extern char *ExplainNChitTest(DWORD); extern char *ExplainDDEnumerateFlags(DWORD); extern char *ExplainsSystemMetrics(DWORD); +extern char *ExplainWPFlags(DWORD); diff --git a/dll/dxhook.cpp b/dll/dxhook.cpp index d1e0360..f71f488 100644 --- a/dll/dxhook.cpp +++ b/dll/dxhook.cpp @@ -122,23 +122,18 @@ static void dx_ToggleLogging() GetHookInfo()->isLogging=(dxw.dwTFlags & OUTTRACE); } -void DumpImportTable(char *module) +void DumpImportTable(HMODULE module) { - DWORD base; PIMAGE_NT_HEADERS pnth; PIMAGE_IMPORT_DESCRIPTOR pidesc; - DWORD rva; + DWORD base, rva; PSTR impmodule; PIMAGE_THUNK_DATA ptaddr; PIMAGE_THUNK_DATA ptname; PIMAGE_IMPORT_BY_NAME piname; - base = (DWORD)GetModuleHandle(module); + base=(DWORD)module; OutTrace("DumpImportTable: base=%x\n", base); - if(!base) { - OutTrace("DumpImportTable: GetModuleHandle failed, err=%d at %d\n",GetLastError(), __LINE__); - return; - } __try{ pnth = PIMAGE_NT_HEADERS(PBYTE(base) + PIMAGE_DOS_HEADER(base)->e_lfanew); if(!pnth) { @@ -214,12 +209,11 @@ void SetHook(void *target, void *hookproc, void **hookedproc, char *hookname) *hookedproc = tmp; } -void *HookAPI(const char *module, char *dll, void *apiproc, const char *apiname, void *hookproc) +void *HookAPI(HMODULE module, char *dll, void *apiproc, const char *apiname, void *hookproc) { - DWORD base; PIMAGE_NT_HEADERS pnth; PIMAGE_IMPORT_DESCRIPTOR pidesc; - DWORD rva; + DWORD base, rva; PSTR impmodule; PIMAGE_THUNK_DATA ptaddr; PIMAGE_THUNK_DATA ptname; @@ -234,11 +228,7 @@ void *HookAPI(const char *module, char *dll, void *apiproc, const char *apiname, return 0; } - base = (DWORD)GetModuleHandle(module); - if(!base) { - OutTraceD("HookAPI: GetModuleHandle failed, error=%d\n",GetLastError()); - return 0; - } + base = (DWORD)module; __try{ pnth = PIMAGE_NT_HEADERS(PBYTE(base) + PIMAGE_DOS_HEADER(base)->e_lfanew); if(!pnth) { @@ -301,7 +291,7 @@ void *HookAPI(const char *module, char *dll, void *apiproc, const char *apiname, OutTraceD("HookAPI: FlushInstructionCache error %d at %d\n", GetLastError(), __LINE__); return 0; } - if(IsDebug) OutTrace("HookAPI hook=%s.%s address=%x->%x\n", module, apiname, org, hookproc); + if(IsDebug) OutTrace("HookAPI hook=%s address=%x->%x\n", apiname, org, hookproc); } __except(EXCEPTION_EXECUTE_HANDLER) { @@ -566,6 +556,48 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp #endif switch(message){ + // v2.02.13: added WM_GETMINMAXINFO/WM_NCCALCSIZE interception - (see Actua Soccer 3 problems...) + case WM_GETMINMAXINFO: + if(dxw.dwFlags1 & LOCKWINPOS){ + extern void dxwFixMinMaxInfo(char *, HWND, LPARAM); + dxwFixMinMaxInfo("WindowProc", hwnd, lparam); + return 0; + } + break; + case WM_NCCALCSIZE: + if(dxw.dwFlags1 & LOCKWINPOS){ + OutTraceD("WindowProc: WS_NCCALCSIZE wparam=%x\n", wparam); + if(wparam){ + // nothing so far .... + if (IsDebug){ + NCCALCSIZE_PARAMS *ncp; + ncp = (NCCALCSIZE_PARAMS *) lparam; + OutTraceD("WindowProc: WS_NCCALCSIZE rect[0]=(%d,%d)-(%d,%d)\n", + ncp->rgrc[0].left, ncp->rgrc[0].top, ncp->rgrc[0].right, ncp->rgrc[0].bottom); + OutTraceD("WindowProc: WS_NCCALCSIZE rect[1]=(%d,%d)-(%d,%d)\n", + ncp->rgrc[1].left, ncp->rgrc[1].top, ncp->rgrc[1].right, ncp->rgrc[1].bottom); + OutTraceD("WindowProc: WS_NCCALCSIZE rect[2]=(%d,%d)-(%d,%d)\n", + ncp->rgrc[2].left, ncp->rgrc[2].top, ncp->rgrc[2].right, ncp->rgrc[2].bottom); + OutTraceD("WindowProc: WS_NCCALCSIZE winrect=(%d,%d)-(%d,%d)\n", + ncp->lppos->x, ncp->lppos->y, ncp->lppos->cx, ncp->lppos->cy); + } + } + else { + // enforce win coordinates and return 0xF0 = WVR_ALIGNTOP|WVR_ALIGNLEFT|WVR_ALIGNBOTTOM|WVR_ALIGNRIGHT; + LPRECT rect; + rect=(LPRECT)lparam; + OutTraceB("WindowProc: WS_NCCALCSIZE proposed rect=(%d,%d)-(%d,%d)\n", + rect->left, rect->top, rect->right, rect->bottom); + rect->left=dxw.iPosX; + rect->top=dxw.iPosY; + rect->right=dxw.iPosX+dxw.iSizX; + rect->bottom=dxw.iPosY+dxw.iSizY; + OutTraceB("WindowProc: WS_NCCALCSIZE fixed rect=(%d,%d)-(%d,%d)\n", + rect->left, rect->top, rect->right, rect->bottom); + return WVR_ALIGNTOP|WVR_ALIGNLEFT|WVR_ALIGNBOTTOM|WVR_ALIGNRIGHT; + } + } + break; case WM_NCCREATE: if(dxw.dwFlags2 & SUPPRESSIME){ OutTraceD("WindowProc: SUPPRESS IME\n"); @@ -749,10 +781,7 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp default: break; } - if (dxw.dwFlags1 & AUTOREFRESH) - { - dxw.ScreenRefresh(); - } + if (dxw.dwFlags1 & AUTOREFRESH) dxw.ScreenRefresh(); pWindowProc=WhndGetWindowProc(hwnd); if(pWindowProc) { @@ -852,7 +881,7 @@ void HookSysLibsInit() pSetTimer=SetTimer; } -void HookGDILib(char *module) +void HookGDILib(HMODULE module) { void *tmp; @@ -921,7 +950,7 @@ void HookGDILib(char *module) } } -void HookSysLibs(char *module) +void HookSysLibs(HMODULE module) { void *tmp; @@ -1047,10 +1076,11 @@ void HookSysLibs(char *module) tmp = HookAPI(module, "user32.dll", MoveWindow, "MoveWindow", extMoveWindow); if(tmp) pMoveWindow = (MoveWindow_Type)tmp; -#define TRAPLOWRESOURCES 0 - if(TRAPLOWRESOURCES){ + if(dxw.dwFlags2 & LIMITRESOURCES){ tmp = HookAPI(module, "kernel32.dll", GetDiskFreeSpaceA, "GetDiskFreeSpaceA", extGetDiskFreeSpaceA); if(tmp) pGetDiskFreeSpaceA = (GetDiskFreeSpaceA_Type)tmp; + tmp = HookAPI(module, "kernel32.dll", GlobalMemoryStatus, "GlobalMemoryStatus", extGlobalMemoryStatus); + if(tmp) pGlobalMemoryStatus = (GlobalMemoryStatus_Type)tmp; } if(dxw.dwFlags2 & TIMESTRETCH){ @@ -1142,15 +1172,17 @@ LONG WINAPI myUnhandledExceptionFilter(LPEXCEPTION_POINTERS ExceptionInfo) void HookExceptionHandler(void) { void *tmp; + HMODULE base; OutTraceD("Set exception handlers\n"); + base=GetModuleHandle(NULL); pSetUnhandledExceptionFilter = SetUnhandledExceptionFilter; //v2.1.75 override default exception handler, if any.... LONG WINAPI myUnhandledExceptionFilter(LPEXCEPTION_POINTERS); - tmp = HookAPI(NULL, "KERNEL32.dll", UnhandledExceptionFilter, "UnhandledExceptionFilter", myUnhandledExceptionFilter); + tmp = HookAPI(base, "KERNEL32.dll", UnhandledExceptionFilter, "UnhandledExceptionFilter", myUnhandledExceptionFilter); // so far, no need to save the previous handler. //if(tmp) pUnhandledExceptionFilter = (UnhandledExceptionFilter_Type)tmp; - tmp = HookAPI(NULL, "KERNEL32.dll", SetUnhandledExceptionFilter, "SetUnhandledExceptionFilter", extSetUnhandledExceptionFilter); + tmp = HookAPI(base, "KERNEL32.dll", SetUnhandledExceptionFilter, "SetUnhandledExceptionFilter", extSetUnhandledExceptionFilter); //tmp = HookAPI("KERNEL32.dll", SetUnhandledExceptionFilter, "SetUnhandledExceptionFilter", myUnhandledExceptionFilter); if(tmp) pSetUnhandledExceptionFilter = (SetUnhandledExceptionFilter_Type)tmp; @@ -1159,34 +1191,17 @@ void HookExceptionHandler(void) //(*pSetUnhandledExceptionFilter)(NULL); } -void HookModule(char *module, int dxversion) +void HookModule(HMODULE base, int dxversion) { - HookSysLibs(module); + HookSysLibs(base); //if(dxw.dwFlags2 & SUPPRESSIME) HookImeLib(module); - if(dxw.dwFlags2 & HOOKGDI) HookGDILib(module); - if(dxw.dwFlags1 & HOOKDI) HookDirectInput(module, dxversion); - HookDirectDraw(module, dxversion); - HookDirect3D(module, dxversion); - HookOle32(module, dxversion); // unfinished business - if(dxw.dwFlags2 & HOOKOPENGL) HookOpenGLLibs(module, dxw.CustomOpenGLLib); -} - -void ForceHookOpenGL() // to do ..... -{ - HMODULE hGlLib; - //hGlLib=(*pLoadLibraryA)("OpenGL32.dll"); - hGlLib=LoadLibrary("OpenGL32.dll"); - OutTrace("hGlLib=%x\n",hGlLib); - pglViewport=(glViewport_Type)GetProcAddress(hGlLib, "glViewport"); - if(pglViewport) - HookAPI(NULL, "OpenGL32.dll", pglViewport, "glViewport", extglViewport); - //SetHook(void *target, void *hookproc, void **hookedproc, char *hookname); - pglScissor=(glScissor_Type)GetProcAddress(hGlLib, "glScissor"); - if(pglScissor) HookAPI(NULL, "OpenGL32.dll", pglScissor, "glScissor", extglScissor); - pglGetIntegerv=(glGetIntegerv_Type)GetProcAddress(hGlLib, "glGetIntegerv"); - if(pglGetIntegerv) HookAPI(NULL, "OpenGL32.dll", pglGetIntegerv, "glGetIntegerv", extglGetIntegerv); - pglDrawBuffer=(glDrawBuffer_Type)GetProcAddress(hGlLib, "glDrawBuffer"); - if(pglDrawBuffer) HookAPI(NULL, "OpenGL32.dll", pglDrawBuffer, "glDrawBuffer", extglDrawBuffer); + if(dxw.dwFlags2 & HOOKGDI) HookGDILib(base); + if(dxw.dwFlags1 & HOOKDI) HookDirectInput(base, dxversion); + HookDirectDraw(base, dxversion); + HookDirect3D(base, dxversion); + HookOle32(base, dxversion); // unfinished business + if(dxw.dwFlags2 & HOOKOPENGL) HookOpenGLLibs(base, dxw.CustomOpenGLLib); + //ForceHookOpenGL(base); } void DisableIME() @@ -1224,10 +1239,12 @@ void DisableIME() #endif } + int HookInit(TARGETMAP *target, HWND hwnd) { BOOL res; WINDOWPOS wp; + HMODULE base; char *sModule; static char *dxversions[14]={ "Automatic", "DirectX1~6", "", "", "", "", "", @@ -1253,17 +1270,16 @@ int HookInit(TARGETMAP *target, HWND hwnd) OutTrace("HookInit: dxw.hParentWnd style=%x(%s) exstyle=%x(%s)\n", dwStyle, ExplainStyle(dwStyle), dwExStyle, ExplainExStyle(dwExStyle)); } + base=GetModuleHandle(NULL); if(dxw.dwFlags1 & HANDLEEXCEPTIONS) HookExceptionHandler(); - if (dxw.dwTFlags & OUTIMPORTTABLE) DumpImportTable(NULL); + if (dxw.dwTFlags & OUTIMPORTTABLE) DumpImportTable(base); //if(dxw.dwFlags2 & SUPPRESSIME) DisableIME(); if (dxw.dwTFlags & DXPROXED){ - HookDDProxy(NULL, dxw.dwTargetDDVersion); + HookDDProxy(base, dxw.dwTargetDDVersion); return 0; } - //ForceHookOpenGL(); - // make InitPosition used for both DInput and DDraw InitPosition(target->initx, target->inity, target->minx, target->miny, target->maxx, target->maxy); @@ -1271,17 +1287,26 @@ int HookInit(TARGETMAP *target, HWND hwnd) HookSysLibsInit(); // this just once... - HookModule(NULL, dxw.dwTargetDDVersion); + if(IsDebug) OutTrace("HookInit: base hmodule=%x\n", base); + HookModule(base, dxw.dwTargetDDVersion); + if(IsDebug){ + extern BOOL ListProcessModules(BOOL); + ListProcessModules(true); + } sModule=strtok(dxw.gsModules," "); while (sModule) { - HMODULE hm; - hm=(*pLoadLibraryA)(sModule); - OutTraceD("HookInit: hooking additional module=%s\n", sModule); - if (dxw.dwTFlags & OUTIMPORTTABLE) DumpImportTable(sModule); - HookModule(sModule, dxw.dwTargetDDVersion); + base=(*pLoadLibraryA)(sModule); + if(!base){ + OutTraceE("HookInit: LoadLibrary ERROR module=%s err=%d\n", sModule, GetLastError()); + continue; + } + OutTraceD("HookInit: hooking additional module=%s base=%x\n", sModule, base); + if (dxw.dwTFlags & OUTIMPORTTABLE) DumpImportTable(base); + HookModule(base, dxw.dwTargetDDVersion); sModule=strtok(NULL," "); } + if(dxw.dwFlags2 & RECOVERSCREENMODE) RecoverScreenMode(); InitScreenParameters(); diff --git a/dll/dxhook.h b/dll/dxhook.h index 1e59b44..8b52b5a 100644 --- a/dll/dxhook.h +++ b/dll/dxhook.h @@ -1,9 +1,9 @@ -extern int HookDirectDraw(char *, int); -extern int HookDDProxy(char *, int); -extern int HookDirect3D(char *, int); -extern int HookOle32(char *, int); -extern int HookDirectInput(char *, int); -extern void HookImeLib(char *); +extern int HookDirectDraw(HMODULE, int); +extern int HookDDProxy(HMODULE, int); +extern int HookDirect3D(HMODULE, int); +extern int HookOle32(HMODULE, int); +extern int HookDirectInput(HMODULE, int); +extern void HookImeLib(HMODULE); extern void InitPosition(int, int, int, int, int, int); //void InitWindowPos(int, int, int, int); extern LPCSTR ProcToString(LPCSTR proc); diff --git a/dll/dxwcore.cpp b/dll/dxwcore.cpp index 085aa9e..c439633 100644 --- a/dll/dxwcore.cpp +++ b/dll/dxwcore.cpp @@ -26,13 +26,13 @@ dxwCore::dxwCore() memset(PrimSurfaces, 0, sizeof(PrimSurfaces)); - // preserved syslibs pointers - pClientToScreen=ClientToScreen; - pClipCursor=ClipCursor; - pGetClientRect=GetClientRect; - pGetCursorPos=GetCursorPos; - pInvalidateRect=InvalidateRect; - pScreenToClient=ScreenToClient; + //// preserved syslibs pointers + //pClientToScreen=ClientToScreen; + //pClipCursor=ClipCursor; + //pGetClientRect=GetClientRect; + //pGetCursorPos=GetCursorPos; + //pInvalidateRect=InvalidateRect; + //pScreenToClient=ScreenToClient; } dxwCore::~dxwCore() @@ -201,6 +201,16 @@ POINT dxwCore::FixCursorPos(HWND hwnd, POINT prev) return curr; } +POINT dxwCore::ScreenToClient(POINT point) +{ + // convert absolute screen coordinates to frame relative + if (!(*pScreenToClient)(hWnd, &point)) { + OutTraceE("ScreenToClient(%x) ERROR %d at %d\n", hWnd, GetLastError(), __LINE__); + point.x =0; point.y=0; + } + return point; +} + void dxwCore::FixNCHITCursorPos(LPPOINT lppoint) { RECT rect; diff --git a/dll/dxwcore.hpp b/dll/dxwcore.hpp index 5d32bdd..54dea0e 100644 --- a/dll/dxwcore.hpp +++ b/dll/dxwcore.hpp @@ -51,6 +51,7 @@ public: // methods char *GetTSCaption(void); void DoSlow(int); void ShowBanner(HWND); + POINT ScreenToClient(POINT); public: // simple data variables DDPIXELFORMAT ActualPixelFormat; @@ -90,12 +91,6 @@ protected: BOOL FullScreen; HWND hWnd; DWORD PrimSurfaces[DDSQLEN+1]; - ClientToScreen_Type pClientToScreen; - ClipCursor_Type pClipCursor; - GetClientRect_Type pGetClientRect; - GetCursorPos_Type pGetCursorPos; - InvalidateRect_Type pInvalidateRect; - ScreenToClient_Type pScreenToClient; }; extern dxwCore dxw; diff --git a/dll/dxwnd.aps b/dll/dxwnd.aps index d183332..412bf14 100644 Binary files a/dll/dxwnd.aps and b/dll/dxwnd.aps differ diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index 6a25ec2..81edfff 100644 --- a/dll/dxwnd.cpp +++ b/dll/dxwnd.cpp @@ -23,7 +23,7 @@ along with this program. If not, see . #include #include "dxwnd.h" -#define VERSION "2.02.12" +#define VERSION "2.02.14" LRESULT CALLBACK HookProc(int ncode, WPARAM wparam, LPARAM lparam); diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index 089797b..79e4771 100644 Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ diff --git a/dll/dxwnd.vs2008.vcproj b/dll/dxwnd.vs2008.vcproj index bef3683..2683385 100644 --- a/dll/dxwnd.vs2008.vcproj +++ b/dll/dxwnd.vs2008.vcproj @@ -352,6 +352,10 @@ RelativePath=".\syslibs.cpp" > + + diff --git a/dll/glhook.cpp b/dll/glhook.cpp index c118333..972dc72 100644 --- a/dll/glhook.cpp +++ b/dll/glhook.cpp @@ -34,21 +34,67 @@ FARPROC Remap_gl_ProcAddress(LPCSTR proc, HMODULE hModule) return NULL; } -void HookOpenGLLibs(char *module, char *customlib) +void ForceHookOpenGL(HMODULE base) // to do ..... +{ + HMODULE hGlLib; + hGlLib=(*pLoadLibraryA)("OpenGL32.dll"); + //hGlLib=LoadLibrary("OpenGL32.dll"); + OutTrace("hGlLib=%x\n",hGlLib); + if(!hGlLib){ + OutTraceE("LoadLibrary(\"OpenGL32.dll\") ERROR: err=%d at %d\n", GetLastError(), __LINE__); + return; + } + + pglViewport=(glViewport_Type)GetProcAddress(hGlLib, "glViewport"); + if(pglViewport) { + HookAPI(base, "opengl32", pglViewport, "glViewport", extglViewport); + extglViewport(dxw.iPosX,dxw.iPosY,dxw.iSizX,dxw.iSizY); + } + pglScissor=(glScissor_Type)GetProcAddress(hGlLib, "glScissor"); + if(pglScissor) { + HookAPI(base, "opengl32", pglScissor, "glScissor", extglScissor); + //extglScissor(dxw.iPosX,dxw.iPosY,dxw.iSizX,dxw.iSizY); + } + pglGetIntegerv=(glGetIntegerv_Type)GetProcAddress(hGlLib, "glGetIntegerv"); + if(pglGetIntegerv) { + HookAPI(base, "opengl32", pglGetIntegerv, "glGetIntegerv", extglGetIntegerv); + //extglGetIntegerv(0, NULL); + } + pglDrawBuffer=(glDrawBuffer_Type)GetProcAddress(hGlLib, "glDrawBuffer"); + if(pglDrawBuffer) { + HookAPI(base, "opengl32", pglDrawBuffer, "glDrawBuffer", extglDrawBuffer); + //extglDrawBuffer(0); + } +} + +void HookOpenGLLibs(HMODULE module, char *customlib) { void *tmp; char *DefOpenGLModule="OpenGL32.dll"; + int HookMode; if (!customlib) customlib=DefOpenGLModule; - tmp = HookAPI(module, customlib, NULL, "glViewport", extglViewport); - if(tmp) pglViewport = (glViewport_Type)tmp; - tmp = HookAPI(module, customlib, NULL, "glScissor", extglScissor); - if(tmp) pglScissor = (glScissor_Type)tmp; - tmp = HookAPI(module, customlib, NULL, "glGetIntegerv", extglGetIntegerv); - if(tmp) pglGetIntegerv = (glGetIntegerv_Type)tmp; - tmp = HookAPI(module, customlib, NULL, "glDrawBuffer", extglDrawBuffer); - if(tmp) pglDrawBuffer = (glDrawBuffer_Type)tmp; + HookMode=0; // temporary ... + switch(HookMode){ + case 0: + tmp = HookAPI(module, customlib, NULL, "glViewport", extglViewport); + if(tmp) pglViewport = (glViewport_Type)tmp; + tmp = HookAPI(module, customlib, NULL, "glScissor", extglScissor); + if(tmp) pglScissor = (glScissor_Type)tmp; + tmp = HookAPI(module, customlib, NULL, "glGetIntegerv", extglGetIntegerv); + if(tmp) pglGetIntegerv = (glGetIntegerv_Type)tmp; + tmp = HookAPI(module, customlib, NULL, "glDrawBuffer", extglDrawBuffer); + if(tmp) pglDrawBuffer = (glDrawBuffer_Type)tmp; + break; + case 1: + static int DoOnce=TRUE; + if(DoOnce){ + ForceHookOpenGL(module); + DoOnce=FALSE; + } + break; + } return; } diff --git a/dll/glhook.h b/dll/glhook.h index 7373db5..c9eff7e 100644 --- a/dll/glhook.h +++ b/dll/glhook.h @@ -1,7 +1,7 @@ #include "gl.h" extern FARPROC Remap_gl_ProcAddress(LPCSTR, HMODULE); -extern void HookOpenGLLibs(char *, char *); +extern void HookOpenGLLibs(HMODULE, char *); typedef void (WINAPI *glViewport_Type)(GLint, GLint, GLsizei, GLsizei); typedef void (WINAPI *glScissor_Type)(GLint, GLint, GLsizei, GLsizei); diff --git a/dll/hd3d.cpp b/dll/hd3d.cpp index f4126d3..1d0af49 100644 --- a/dll/hd3d.cpp +++ b/dll/hd3d.cpp @@ -37,7 +37,7 @@ Present_Type pPresent; DWORD dwD3DVersion; -int HookDirect3D(char *module, int version){ +int HookDirect3D(HMODULE module, int version){ HINSTANCE hinst; void *tmp; LPDIRECT3D9 lpd3d; diff --git a/dll/hddproxy.cpp b/dll/hddproxy.cpp index e10f5f9..75fef85 100644 --- a/dll/hddproxy.cpp +++ b/dll/hddproxy.cpp @@ -273,7 +273,7 @@ FARPROC WINAPI extGetProcAddressProxy(HMODULE hModule, LPCSTR proc) // // ------------------------------------------------------------------------------------------ // -int HookDDProxy(char *module, int dxVersion) +int HookDDProxy(HMODULE module, int dxVersion) { HINSTANCE hinst; void *tmp; diff --git a/dll/hddraw.cpp b/dll/hddraw.cpp index 5875bf2..aecf983 100644 --- a/dll/hddraw.cpp +++ b/dll/hddraw.cpp @@ -486,8 +486,8 @@ HRESULT STDAPICALLTYPE extCoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, OutTraceD("CoCreateInstance: CLSID_FilterGraph RIID=%x\n", *(DWORD *)&riid); qlib=(*pLoadLibraryA)("quartz.dll"); OutTraceD("CoCreateInstance: quartz lib handle=%x\n", qlib); - extern void HookSysLibs(char *); - HookSysLibs("quartz"); + extern void HookSysLibs(HMODULE); + HookSysLibs(qlib); } res=(*pCoCreateInstance)(rclsid, pUnkOuter, dwClsContext, riid, ppv); @@ -533,7 +533,7 @@ HRESULT STDAPICALLTYPE extCoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, return res; } -int HookOle32(char *module, int version) +int HookOle32(HMODULE module, int version) { // used by Axis & Allies .... void *tmp; @@ -544,7 +544,7 @@ int HookOle32(char *module, int version) return 0; } -int HookDirectDraw(char *module, int version) +int HookDirectDraw(HMODULE module, int version) { HINSTANCE hinst; void *tmp; @@ -1466,7 +1466,10 @@ HRESULT WINAPI extQueryInterfaceS(void *lpdds, REFIID riid, LPVOID *obp) } else{ dxw.UnmarkPrimarySurface((LPDIRECTDRAWSURFACE)*obp); - HookDDSurfaceGeneric((LPDIRECTDRAWSURFACE *)obp, dxw.dwDDVersion); + // v2.02.13: seems that hooking inconditionally gives troubles. What is the proper hook condition? + // maybe when in emulation mode? + //ASSERT TO BE FINISHED + if(dxw.dwFlags1 & EMULATESURFACE) HookDDSurfaceGeneric((LPDIRECTDRAWSURFACE *)obp, dxw.dwDDVersion); } break; @@ -1834,11 +1837,13 @@ HRESULT WINAPI extCreateSurfaceEmu(int dxversion, CreateSurface_Type pCreateSurf // not primary emulated surface .... if(((ddsd.dwFlags & DDSD_WIDTH) && !(ddsd.dwFlags & DDSD_HEIGHT)) || (ddsd.dwFlags & DDSD_ZBUFFERBITDEPTH) || - (ddsd.dwFlags & DDSD_PIXELFORMAT) || + //(ddsd.dwFlags & DDSD_PIXELFORMAT) || + ((ddsd.dwFlags & DDSD_PIXELFORMAT) && !(ddsd.dwFlags & DDSD_PITCH)) || // fix good for "Wargames" //((ddsd.dwFlags & DDSD_CAPS) && (ddsd.ddsCaps.dwCaps & DDSCAPS_TEXTURE)) || ((ddsd.dwFlags & DDSD_CAPS) && (ddsd.ddsCaps.dwCaps & DDSCAPS_3DDEVICE))){ // don't alter pixel format //ddsd.dwFlags &= ~DDSD_PIXELFORMAT; // Warhammer Dark Omen + ddsd.dwFlags &= ~DDSD_PIXELFORMAT; // Wargames ??? pfmt="(none)"; } else { @@ -1851,6 +1856,7 @@ HRESULT WINAPI extCreateSurfaceEmu(int dxversion, CreateSurface_Type pCreateSurf } DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Emu Generic]" , __LINE__); + //OutTrace("pCreateSurface=%x lpdd=%x &ddsd=%x lplpdds=%x pu=%x\n",pCreateSurface, lpdd, &ddsd, lplpdds, pu); res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, pu); if(res){ // v2.1.81: retry on system memory may fix not only the DDERR_OUTOFVIDEOMEMORY @@ -2102,8 +2108,8 @@ HRESULT WINAPI extCreateSurface(int dxversion, CreateSurface_Type pCreateSurface { HRESULT res; - //GHO: beware: incomplete trace line - must be line terminated below! if(IsTraceD){ + // beware: incomplete trace lines - must be line terminated below! OutTrace("CreateSurface: Version=%d lpdd=%x Flags=%x(%s)", dxversion, lpdd, lpddsd->dwFlags, ExplainFlags(lpddsd->dwFlags)); if (lpddsd->dwFlags & DDSD_CAPS && lpddsd->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) OutTrace(" VirtualScreen=(%d,%d)", dxw.GetScreenWidth(), dxw.GetScreenHeight()); if (lpddsd->dwFlags & DDSD_BACKBUFFERCOUNT) OutTrace(" BackBufferCount=%d", lpddsd->dwBackBufferCount); @@ -2117,7 +2123,7 @@ HRESULT WINAPI extCreateSurface(int dxversion, CreateSurface_Type pCreateSurface OutTrace("\n"); } - //GHO workaround (needed for WarWind): + //GHO workaround (needed for WarWind, Rogue Spear): if (lpddsd->dwFlags && !(lpddsd->dwFlags & 0x1)){ OutTraceD("CreateSurface: fixing illegal dwFlags value: %x -> %x\n", lpddsd->dwFlags, lpddsd->dwFlags+1); @@ -2551,6 +2557,7 @@ HRESULT WINAPI extBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, lpsrcrect=NULL; lpdestrect=NULL; } + return sBlt("Blt", lpdds, lpdestrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx, FALSE); } @@ -2794,15 +2801,25 @@ HRESULT WINAPI extSetClipper(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWCLIPPER lpdd // clipping ON & OFF affects blitting on primary surface. if(dxw.dwFlags1 & SUPPRESSCLIPPING) return 0; - if(isPrim && (dxw.dwFlags1 & (EMULATESURFACE|EMULATEBUFFER)) && lpDDSEmu_Prim){ - res=(*pSetClipper)(lpDDSEmu_Prim, lpddc); - if(res) OutTraceE("CreateSurface: SetClipper ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); - lpDDC = lpddc; - // n.b. SetHWnd was not wrapped, so pSetHWnd is not usable (NULL) !!! - if(lpDDC) res=lpDDC->SetHWnd( 0, dxw.GethWnd()); - //res=(*pSetHWnd)(lpDDC, 0, dxw.GethWnd()); - if(res) OutTraceE("CreateSurface: SetHWnd ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); - //res = 0; + if(dxw.dwFlags1 & (EMULATESURFACE|EMULATEBUFFER)){ + if (isPrim && lpDDSEmu_Prim) { + res=(*pSetClipper)(lpDDSEmu_Prim, lpddc); + if(res) OutTraceE("CreateSurface: SetClipper ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + lpDDC = lpddc; + // n.b. SetHWnd was not wrapped, so pSetHWnd is not usable (NULL) !!! + if(lpDDC) res=lpDDC->SetHWnd( 0, dxw.GethWnd()); + if(res) OutTraceE("CreateSurface: SetHWnd ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + } + else if ((lpdds == lpDDSBack) && lpDDSEmu_Back) { + res=(*pSetClipper)(lpDDSEmu_Back, lpddc); + if(res) OutTraceE("CreateSurface: SetClipper ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + lpDDC = lpddc; + // n.b. SetHWnd was not wrapped, so pSetHWnd is not usable (NULL) !!! + if(lpDDC) res=lpDDC->SetHWnd( 0, dxw.GethWnd()); + if(res) OutTraceE("CreateSurface: SetHWnd ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + } + else + res=(*pSetClipper)(lpdds, lpddc); } else // just proxy ... @@ -3322,9 +3339,11 @@ HRESULT WINAPI extReleaseS(LPDIRECTDRAWSURFACE lpdds) __try{ HRESULT dw=(DWORD)(*pReleaseS); if ((dw & 0xF0000000) == 0xF0000000) IsClosed=1; + if ((*(DWORD *)lpdds & 0xF0000000) == 0xF0000000) IsClosed=1; + if(IsClosed) OutTraceE("Release(S): ASSERT got closed surface lpdds=%x\n", lpdds); } __except (EXCEPTION_EXECUTE_HANDLER){ - OutTraceD("Exception at %d\n",__LINE__); + OutTraceE("Exception at %d\n",__LINE__); IsClosed=1; }; @@ -3450,28 +3469,35 @@ HRESULT WINAPI extAddAttachedSurface(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWSURF OutTraceD("AddAttachedSurface: lpdds=%x%s lpddsadd=%x\n", lpdds, IsPrim?"(PRIM)":"", lpddsadd); res=(*pAddAttachedSurface)(lpdds, lpddsadd); if (res) { + HRESULT sdres; + DDSURFACEDESC2 sd; + sd.dwSize=Set_dwSize_From_Surface(lpddsadd); + sdres=lpddsadd->GetSurfaceDesc((DDSURFACEDESC *)&sd); + if (sdres) + OutTraceE("AddAttachedSurface: GetSurfaceDesc ERROR res=%x at %d\n", sdres, __LINE__); + else + OutTraceD("AddAttachedSurface: GetSurfaceDesc dwCaps=%x(%s)\n", + sd.ddsCaps.dwCaps, ExplainDDSCaps(sd.ddsCaps.dwCaps)); if (IsPrim){ - HRESULT sdres; - DDSURFACEDESC2 sd; - sd.dwSize=Set_dwSize_From_Surface(lpddsadd); - sdres=lpddsadd->GetSurfaceDesc((DDSURFACEDESC *)&sd); - if (sdres) - OutTraceE("AddAttachedSurface: GetSurfaceDesc ERROR res=%x at %d\n", sdres, __LINE__); - else - OutTraceD("AddAttachedSurface: GetSurfaceDesc dwCaps=%x(%s)\n", - sd.ddsCaps.dwCaps, ExplainDDSCaps(sd.ddsCaps.dwCaps)); if (sd.ddsCaps.dwCaps & DDSCAPS_BACKBUFFER) if ((dxw.dwFlags1 & EMULATESURFACE) && (res==DDERR_CANNOTATTACHSURFACE) || (res==DDERR_NOEXCLUSIVEMODE)) - OutTraceD("AddAttachedSurface: emulating surface attach on PRIMARY\n"); + OutTraceD("AddAttachedSurface: emulating BACKBUFFER attach on PRIMARY\n"); lpDDSBack=lpddsadd; - res=0; + (*pAddRefS)(lpdds); + res=DD_OK; + } + else if (lpdds == lpDDSBack) { + // v2.02.13: emulate ZBUFFER attach to backbuffer: do nothing and return OK + // this trick makes at least "Nocturne" work also in emulated mode when hardware acceleration + // is set in the game "Options" menu. + if (sd.ddsCaps.dwCaps & DDSCAPS_ZBUFFER) // DDSCAPS_BACKBUFFER for double buffering ??? + if ((dxw.dwFlags1 & EMULATESURFACE) && (res==DDERR_CANNOTATTACHSURFACE)){ + OutTraceD("AddAttachedSurface: emulating ZBUFFER attach on BACKBUFFER\n"); + (*pAddRefS)(lpdds); + res=DD_OK; + } } - //// v2.1.73: Alien Cabal 95 in EMU mode - //if((lpdds==lpDDSBack) && (dxw.dwFlags1 & EMULATESURFACE)){ - // OutTraceD("AddAttachedSurface: ignoring err=%x(%s) on BACKBUFFER surface attach\n", res, ExplainDDError(res)); - // res=DD_OK; - //} } if (res) OutTraceE("AddAttachedSurface: ERROR %x(%s)\n", res, ExplainDDError(res)); return res; @@ -3550,11 +3576,24 @@ ULONG WINAPI extReleaseD(LPDIRECTDRAW lpdd) { ULONG ref; int dxversion; + BOOL IsClosed; dxversion=lpddHookedVersion(lpdd); // must be called BEFORE releasing the session!! OutTraceD("Release(D): lpdd=%x\n", lpdd); - ref=(*pReleaseD)(lpdd); + IsClosed=0; + __try{ + HRESULT dw=(DWORD)(*pReleaseD); + if ((dw & 0xF0000000) == 0xF0000000) IsClosed=1; + if ((*(DWORD *)lpdd & 0xF0000000) == 0xF0000000) IsClosed=1; + if(IsClosed) OutTraceE("Release(D): ASSERT got closed session lpdd=%x\n", lpdd); + } + __except (EXCEPTION_EXECUTE_HANDLER){ + OutTraceE("Exception at %d\n",__LINE__); + IsClosed=1; + }; + + ref=IsClosed?0:(*pReleaseD)(lpdd); if (lpdd == lpServiceDD) { // v2.1.87: fix for Dungeon Keeper II OutTraceD("Release(D): service lpdd=%x version=%d\n", lpdd, dxversion); @@ -3708,8 +3747,24 @@ HRESULT WINAPI extReleaseP(LPDIRECTDRAWPALETTE lpddPalette) // returning a ref 0 without actually releasing the object. //v2.02.08: Better fix: to avoid the problem, just remember to NULL-ify the global main // palette pointer lpDDP + //v2.02.13: still problems in Virtua Fighter 2 in emu mode. Added try catch protection. ULONG ref; - ref=(*pReleaseP)(lpddPalette); + BOOL IsClosed; + + // handling of service closed surfaces + IsClosed=0; + __try{ + HRESULT dw=(DWORD)(*pReleaseP); + if ((dw & 0xF0000000) == 0xF0000000) IsClosed=1; + if ((*(DWORD*)lpddPalette & 0xF0000000) == 0xF0000000) IsClosed=1; + if(IsClosed) OutTraceE("Release(P): ASSERT got closed palette lpddPalette=%x\n", lpddPalette); + } + __except (EXCEPTION_EXECUTE_HANDLER){ + OutTraceE("Exception at %d\n",__LINE__); + IsClosed=1; + }; + + ref=IsClosed ? 0 :(*pReleaseP)(lpddPalette); OutTraceD("Release(P): lpddPalette=%x ref=%x\n", lpddPalette, ref); if(lpddPalette==lpDDP && ref==0){ OutTraceD("Release(P): clearing lpDDP=%x->NULL\n", lpDDP); diff --git a/dll/hdinput.cpp b/dll/hdinput.cpp index 80f0b71..2b720db 100644 --- a/dll/hdinput.cpp +++ b/dll/hdinput.cpp @@ -46,7 +46,7 @@ int iCurMinY; int iCurMaxX; int iCurMaxY; -int HookDirectInput(char *module, int version) +int HookDirectInput(HMODULE module, int version) { HINSTANCE hinst; void *tmp; diff --git a/dll/imelib.cpp b/dll/imelib.cpp index eb8648a..dcbace1 100644 --- a/dll/imelib.cpp +++ b/dll/imelib.cpp @@ -58,7 +58,7 @@ BOOL WINAPI extImmGetOpenStatus(HIMC hIMC) return(*pImmGetOpenStatus)(hIMC); } -void HookImeLib(char *module) +void HookImeLib(HMODULE module) { void *tmp; diff --git a/dll/syslibs.cpp b/dll/syslibs.cpp index 25b31d3..de45683 100644 --- a/dll/syslibs.cpp +++ b/dll/syslibs.cpp @@ -184,6 +184,7 @@ HWND WINAPI extCreateWindowExA( // v2.1.100: fixes for "The Grinch": this game creates a new main window for OpenGL // rendering using CW_USEDEFAULT placement and 800x600 size while the previous // main win was 640x480 only! + // v2.02.13: if it's a WS_CHILD window, don't reposition the x,y, placement for BIG win. if ( ( ((x==0)&&(y==0)) || ((x==CW_USEDEFAULT)&&(y==CW_USEDEFAULT)) @@ -206,8 +207,10 @@ HWND WINAPI extCreateWindowExA( isValidHandle = TRUE; } while(FALSE); if (isValidHandle){ - x=upleft.x; - y=upleft.y; + if (!(dwStyle & WS_CHILD)){ + x=upleft.x; + y=upleft.y; + } nWidth=screen.right; nHeight=screen.bottom; OutTraceD("CreateWindowEx: fixed BIG win pos=(%d,%d) size=(%d,%d)\n", x, y, nWidth, nHeight); @@ -215,8 +218,10 @@ HWND WINAPI extCreateWindowExA( else { // invalid parent coordinates: use initial placement, but leave the size. // should also fix the window style and compensate for borders here? - x=dxw.iPosX; - y=dxw.iPosY; + if (!(dwStyle & WS_CHILD)){ + x=dxw.iPosX; + y=dxw.iPosY; + } nWidth=dxw.iSizX; nHeight=dxw.iSizY; OutTraceD("CreateWindowEx: renewed BIG win pos=(%d,%d) size=(%d,%d)\n", x, y, nWidth, nHeight); @@ -422,72 +427,8 @@ BOOL WINAPI extGetCursorPos(LPPOINT lppoint) res=1; } - if(dxw.dwFlags2 & DIFFERENTIALMOUSE){ - int NewX, NewY; - RECT client; - POINT corner={0,0}; - - // get win placement - (*pGetClientRect)(dxw.GethWnd(), &client); - (*pClientToScreen)(dxw.GethWnd(), &corner); - NewX = lppoint->x - PrevX + LastCurPosX; - NewY = lppoint->y - PrevY + LastCurPosY; - // handle virtual clipping - if(lppoint->x <= corner.x) NewX--; - if(lppoint->x >= corner.x+client.right-1) NewX++; - if(lppoint->y <= corner.y) NewY--; - if(lppoint->y >= corner.y+client.bottom-1) NewY++; - - // swap coordinates... - PrevX=lppoint->x; - PrevY=lppoint->y; - lppoint->x = NewX; - lppoint->y = NewY; - OutTraceC("GetCursorPos: DIFF pos=(%d,%d) delta=(%d,%d)->(%d,%d)\n", - PrevX, PrevY, LastCurPosX, LastCurPosY, NewX, NewY); - return TRUE; - } - - PrevX=lppoint->x; - PrevY=lppoint->y; - - if(dxw.dwFlags1 & MODIFYMOUSE){ - RECT rect; - - // find window metrics - if (!(*pGetClientRect)(dxw.GethWnd(), &rect)){ - OutTraceE("GetClientRect(%x) ERROR %d at %d\n", dxw.GethWnd(), GetLastError(), __LINE__); - lppoint->x =0; lppoint->y=0; - return TRUE; - } - - // convert absolute screen coordinates to frame relative - if (!(*pScreenToClient)(dxw.GethWnd(), lppoint)) { - OutTraceE("ScreenToClient(%x) ERROR %d at %d\n", dxw.GethWnd(), GetLastError(), __LINE__); - lppoint->x =0; lppoint->y=0; - return TRUE; - } - - // divide by zero check - if (rect.right==0 || rect.bottom==0){ - OutTraceC("avoiding divide by zero for (x,y)=(%d,%d) at %d\n", rect.right, rect.bottom, __LINE__); - lppoint->x=0; lppoint->y=0; - return TRUE; - } - - // ensure you stay within borders - // and avoid trusting arithmetic operations on negative integers!!! - if (lppoint->x < 0) lppoint->x=0; - if (lppoint->y < 0) lppoint->y=0; - if (lppoint->x > rect.right) lppoint->x=rect.right; - if (lppoint->y > rect.bottom) lppoint->y=rect.bottom; - - lppoint->x = (lppoint->x * dxw.GetScreenWidth()) / rect.right; - lppoint->y = (lppoint->y * dxw.GetScreenHeight()) / rect.bottom; - - OutTraceC("GetCursorPos: hwnd=%x res=%x XY=(%d,%d)->(%d,%d)\n", - dxw.GethWnd(), res, PrevX, PrevY, lppoint->x, lppoint->y); - } + *lppoint=dxw.ScreenToClient(*lppoint); + *lppoint=dxw.FixCursorPos(*lppoint); return res; } @@ -716,6 +657,12 @@ LONG WINAPI extSetWindowLong(HWND hwnd, int nIndex, LONG dwNewLong) if (nIndex==GWL_WNDPROC){ long lres; + // GPL fix + if(hwnd==0) { + hwnd=dxw.GethWnd(); + OutTrace("SetWindowLong: NULL hwnd, FIXING hwnd=%x\n",hwnd); + } + // end of GPL fix res=(LONG)WhndGetWindowProc(hwnd); WhndStackPush(hwnd, (WNDPROC)dwNewLong); SetLastError(0); @@ -841,10 +788,11 @@ void dxwFixWindowPos(char *ApiName, HWND hwnd, LPARAM lParam) static int BorderY=-1; int cx, cy; - OutTraceD("%s: GOT hwnd=%x pos=(%d,%d) dim=(%d,%d) Flags=%x\n", - ApiName, hwnd, wp->x, wp->y, wp->cx, wp->cy, wp->flags); + OutTraceD("%s: GOT hwnd=%x pos=(%d,%d) dim=(%d,%d) Flags=%x(%s)\n", + ApiName, hwnd, wp->x, wp->y, wp->cx, wp->cy, wp->flags, ExplainWPFlags(wp->flags)); - if (wp->flags & (SWP_NOMOVE|SWP_NOSIZE)) return; //v2.02.10 + if ((wp->flags & (SWP_NOMOVE|SWP_NOSIZE))==(SWP_NOMOVE|SWP_NOSIZE)) return; //v2.02.13 + //if (wp->flags & (SWP_NOMOVE|SWP_NOSIZE)) return; //v2.02.10 if ((dxw.dwFlags1 & LOCKWINPOS) && dxw.IsFullScreen() && (hwnd==dxw.GethWnd())){ extern void CalculateWindowPos(HWND, DWORD, DWORD, LPWINDOWPOS); @@ -1352,6 +1300,7 @@ BOOL WINAPI extScreenToClient(HWND hwnd, LPPOINT lppoint) BOOL WINAPI extGetClientRect(HWND hwnd, LPRECT lpRect) { + BOOL ret; OutTraceD("GetClientRect: whnd=%x FullScreen=%x\n", hwnd, dxw.IsFullScreen()); if (lpRect && dxw.IsFullScreen() && (hwnd == dxw.GethWnd())){ lpRect->left=0; @@ -1375,7 +1324,9 @@ BOOL WINAPI extGetClientRect(HWND hwnd, LPRECT lpRect) } // proxed call - return (*pGetClientRect)(hwnd, lpRect); + ret=(*pGetClientRect)(hwnd, lpRect); + OutTraceB("GetClientRect: rect=(%d,%d)-(%d,%d) ret=%d\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, ret); + return ret; } BOOL WINAPI extGetWindowRect(HWND hwnd, LPRECT lpRect) @@ -1529,16 +1480,20 @@ char *SysNames2[SYSLIBIDX_MAX]={ "ddraw", "opengl32" }; -extern void HookModule(char *, int); -extern void HookSysLibs(char *); +extern void HookModule(HMODULE, int); +extern void HookSysLibs(HMODULE); HMODULE WINAPI extLoadLibraryA(LPCTSTR lpFileName) { - HMODULE ret; + HMODULE libhandle; int idx; char *lpName, *lpNext; - ret=(*pLoadLibraryA)(lpFileName); - OutTraceD("LoadLibraryA: FileName=%s hmodule=%x\n", lpFileName, ret); + libhandle=(*pLoadLibraryA)(lpFileName); + OutTraceD("LoadLibraryA: FileName=%s hmodule=%x\n", lpFileName, libhandle); + if(!libhandle){ + OutTraceE("LoadLibraryExA: ERROR FileName=%s err=%d\n", lpFileName, GetLastError()); + return libhandle; + } lpName=(char *)lpFileName; while (lpNext=strchr(lpName,'\\')) lpName=lpNext+1; for(idx=0; idxFileName=%s\n", ret, lpFileName); - SysLibs[idx]=ret; + OutTraceD("LoadLibraryA: registered hmodule=%x->FileName=%s\n", libhandle, lpFileName); + SysLibs[idx]=libhandle; break; } } // handle custom OpenGL library if(!lstrcmpi(lpName,dxw.CustomOpenGLLib)){ idx=SYSLIBIDX_OPENGL; - SysLibs[idx]=ret; + SysLibs[idx]=libhandle; } - //if(idx==SYSLIBIDX_MAX) { - // OutTraceD("LoadLibraryA: hook %s\n", lpName); - // HookModule((char *)lpName, 0); - //} - //HookSysLibs(NULL); - HookModule(NULL, 0); - return ret; + + // don't hook target libraries, hook all the remaining ones! + if(idx==SYSLIBIDX_MAX) HookModule(libhandle, 0); + return libhandle; } HMODULE WINAPI extLoadLibraryW(LPCWSTR lpFileName) { +#if 0 HMODULE ret; int idx; LPCWSTR lpName, lpNext; @@ -1589,22 +1542,28 @@ HMODULE WINAPI extLoadLibraryW(LPCWSTR lpFileName) idx=SYSLIBIDX_OPENGL; SysLibs[idx]=ret; } - //if(idx==SYSLIBIDX_MAX) { - // OutTraceD("LoadLibraryW: hook %s\n", lpName); - // HookModule((char *)lpName, 0); - //} - //HookSysLibs(NULL); - HookModule(NULL, 0); + char sName[81]; + wcstombs(sName, lpName, 80); + HookModule(sName, 0); return ret; +#else + char sFileName[256+1]; + wcstombs(sFileName, lpFileName, 80); + return extLoadLibraryA(sFileName); +#endif } HMODULE WINAPI extLoadLibraryExA(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags) { - HMODULE ret; + HMODULE libhandle; int idx; char *lpName, *lpNext; - ret=(*pLoadLibraryExA)(lpFileName, hFile, dwFlags); - OutTraceD("LoadLibraryExA: FileName=%s hFile=%x Flags=%x hmodule=%x\n", lpFileName, hFile, dwFlags, ret); + libhandle=(*pLoadLibraryExA)(lpFileName, hFile, dwFlags); + OutTraceD("LoadLibraryExA: FileName=%s hFile=%x Flags=%x hmodule=%x\n", lpFileName, hFile, dwFlags, libhandle); + if(!libhandle){ + OutTraceE("LoadLibraryExA: ERROR FileName=%s err=%d\n", lpFileName, GetLastError()); + return libhandle; + } lpName=(char *)lpFileName; while (lpNext=strchr(lpName,'\\')) lpName=lpNext+1; for(idx=0; idxFileName=%s\n", ret, lpFileName); - SysLibs[idx]=ret; + OutTraceD("LoadLibraryExA: registered hmodule=%x->FileName=%s\n", libhandle, lpFileName); + SysLibs[idx]=libhandle; break; } } // handle custom OpenGL library if(!lstrcmpi(lpName,dxw.CustomOpenGLLib)){ idx=SYSLIBIDX_OPENGL; - SysLibs[idx]=ret; + SysLibs[idx]=libhandle; } - //if(idx==SYSLIBIDX_MAX) { - // OutTraceD("LoadLibraryExA: hook %s\n", lpName); - // HookModule((char *)lpName, 0); - //} - //HookSysLibs(NULL); - HookModule(NULL, 0); - return ret; + HookModule(libhandle, 0); + return libhandle; } HMODULE WINAPI extLoadLibraryExW(LPCWSTR lpFileName, HANDLE hFile, DWORD dwFlags) { +#if 0 HMODULE ret; int idx; LPCWSTR lpName, lpNext; @@ -1655,13 +1610,15 @@ HMODULE WINAPI extLoadLibraryExW(LPCWSTR lpFileName, HANDLE hFile, DWORD dwFlags idx=SYSLIBIDX_OPENGL; SysLibs[idx]=ret; } - //if(idx==SYSLIBIDX_MAX) { - // OutTraceD("LoadLibraryExW: hook %s\n", lpName); - // HookModule((char *)lpName, 0); - //} - //HookSysLibs(NULL); - HookModule(NULL, 0); + char sName[81]; + wcstombs(sName, lpName, 80); + HookModule(sName, 0); return ret; +#else + char sFileName[256+1]; + wcstombs(sFileName, lpFileName, 80); + return extLoadLibraryExA(sFileName, hFile, dwFlags); +#endif } extern DirectDrawCreate_Type pDirectDrawCreate; @@ -2680,8 +2637,10 @@ DWORD WINAPI extSleepEx(DWORD dwMilliseconds, BOOL bAlertable) DWORD WINAPI exttimeGetTime(void) { - if (IsDebug) OutTrace("timeGetTime\n"); - return dxw.GetTickCount(); + DWORD ret; + ret = dxw.GetTickCount(); + if (IsDebug) OutTrace("timeGetTime: time=%x\n", ret); + return ret; } void WINAPI extGetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime) @@ -2695,23 +2654,23 @@ int WINAPI extShowCursor(BOOL bShow) static int iFakeCounter; int ret; - OutTraceD("ShowCursor: bShow=%x\n", bShow); + OutTraceC("ShowCursor: bShow=%x\n", bShow); if (bShow){ if (dxw.dwFlags1 & HIDEHWCURSOR){ iFakeCounter++; - OutTraceD("ShowCursor: HIDEHWCURSOR ret=%x\n", iFakeCounter); + OutTraceC("ShowCursor: HIDEHWCURSOR ret=%x\n", iFakeCounter); return iFakeCounter; } } else { if (dxw.dwFlags2 & SHOWHWCURSOR){ iFakeCounter--; - OutTraceD("ShowCursor: SHOWHWCURSOR ret=%x\n", iFakeCounter); + OutTraceC("ShowCursor: SHOWHWCURSOR ret=%x\n", iFakeCounter); return iFakeCounter; } } ret=(*pShowCursor)(bShow); - OutTraceD("ShowCursor: ret=%x\n", ret); + OutTraceC("ShowCursor: ret=%x\n", ret); return ret; } @@ -2730,10 +2689,17 @@ Windows Server 2003 5.2 5 2 GetSystemMetrics(SM_SERVERR2) == 0 Windows XP Pro x64 Ed. 5.2 5 2 (OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION) && (SYSTEM_INFO.wProcessorArchitecture==PROCESSOR_ARCHITECTURE_AMD64) Windows XP 5.1 5 1 Not applicable Windows 2000 5.0 5 0 Not applicable +From http://delphi.about.com/cs/adptips2000/a/bltip1100_2.htm +Windows 95 4.0 4 0 +Windows 98/SE" 4.10 4 10 if osVerInfo.szCSDVersion[1] = 'A' then Windows98SE +Windows ME 4.90 4 90 */ -static struct {char bMajor; char bMinor; char *sName;} WinVersions[6]= +static struct {char bMajor; char bMinor; char *sName;} WinVersions[9]= { + {4, 0, "Windows 95"}, + {4,10, "Windows 98/SE"}, + {4,90, "Windows ME"}, {5, 0, "Windows 2000"}, {5, 1, "Windows XP"}, {5, 2, "Windows Server 2003"}, @@ -2800,3 +2766,38 @@ DWORD WINAPI extGetVersion(void) return dwVersion; } +/* ------------------------------------------------------------------------------- + +GlobalMemoryStatus: MSDN documents that on modern PCs that have more than DWORD +memory values the GlobalMemoryStatus sets the fields to -1 (0xFFFFFFFF) and you +should use GlobalMemoryStatusEx instead. +But in some cases the value is less that DWORD max, but greater that DWORD>>1, that +is the calling application may get a big value and see it as a signed negative +value, as it happened to Nocturne on my PC. That's why it's not adviseable to write: +if(lpBuffer->dwTotalPhys== -1) ... +but this way: +if ((int)lpBuffer->dwTotalPhys < 0) ... +and also don't set +BIGENOUGH 0x80000000 // possibly negative!!! +but: +BIGENOUGH 0x20000000 // surely positive !!! + +/* ---------------------------------------------------------------------------- */ +#define BIGENOUGH 0x20000000 + +void WINAPI extGlobalMemoryStatus(LPMEMORYSTATUS lpBuffer) +{ + (*pGlobalMemoryStatus)(lpBuffer); + OutTraceD("GlobalMemoryStatus: Length=%x MemoryLoad=%x " + "TotalPhys=%x AvailPhys=%x TotalPageFile=%x AvailPageFile=%x TotalVirtual=%x AvailVirtual=%x\n", + lpBuffer->dwMemoryLoad, lpBuffer->dwTotalPhys, lpBuffer->dwAvailPhys, + lpBuffer->dwTotalPageFile, lpBuffer->dwAvailPageFile, lpBuffer->dwTotalVirtual, lpBuffer->dwAvailVirtual); + if(lpBuffer->dwLength==sizeof(MEMORYSTATUS)){ + if ((int)lpBuffer->dwTotalPhys < 0) lpBuffer->dwTotalPhys = BIGENOUGH; + if ((int)lpBuffer->dwAvailPhys < 0) lpBuffer->dwAvailPhys = BIGENOUGH; + if ((int)lpBuffer->dwTotalPageFile < 0) lpBuffer->dwTotalPageFile = BIGENOUGH; + if ((int)lpBuffer->dwAvailPageFile < 0) lpBuffer->dwAvailPageFile = BIGENOUGH; + if ((int)lpBuffer->dwTotalVirtual < 0) lpBuffer->dwTotalVirtual = BIGENOUGH; + if ((int)lpBuffer->dwAvailVirtual < 0) lpBuffer->dwAvailVirtual = BIGENOUGH; + } +} diff --git a/dll/syslibs.h b/dll/syslibs.h index 74aa82a..b5e3d18 100644 --- a/dll/syslibs.h +++ b/dll/syslibs.h @@ -56,6 +56,7 @@ typedef void (WINAPI *GetSystemTimeAsFileTime_Type)(LPFILETIME); typedef DWORD (WINAPI *GetTickCount_Type)(void); typedef DWORD (WINAPI *GetVersion_Type)(void); typedef BOOL (WINAPI *GetVersionEx_Type)(LPOSVERSIONINFO); +typedef void (WINAPI *GlobalMemoryStatus_Type)(LPMEMORYSTATUS); typedef HMODULE (WINAPI *LoadLibraryA_Type)(LPCTSTR); typedef HMODULE (WINAPI *LoadLibraryExA_Type)(LPCTSTR, HANDLE, DWORD); typedef HMODULE (WINAPI *LoadLibraryW_Type)(LPCWSTR); @@ -169,6 +170,7 @@ DXWEXTERN GetSystemTimeAsFileTime_Type pGetSystemTimeAsFileTime DXWINITIALIZED; DXWEXTERN GetTickCount_Type pGetTickCount DXWINITIALIZED; DXWEXTERN GetVersion_Type pGetVersion DXWINITIALIZED; DXWEXTERN GetVersionEx_Type pGetVersionEx DXWINITIALIZED; +DXWEXTERN GlobalMemoryStatus_Type pGlobalMemoryStatus DXWINITIALIZED; DXWEXTERN LoadLibraryA_Type pLoadLibraryA DXWINITIALIZED; DXWEXTERN LoadLibraryExA_Type pLoadLibraryExA DXWINITIALIZED; DXWEXTERN LoadLibraryW_Type pLoadLibraryW DXWINITIALIZED; @@ -275,6 +277,7 @@ extern void WINAPI extGetSystemTimeAsFileTime(LPFILETIME); extern DWORD WINAPI extGetTickCount(void); extern DWORD WINAPI extGetVersion(void); extern BOOL WINAPI extGetVersionEx(LPOSVERSIONINFO); +extern void WINAPI extGlobalMemoryStatus(LPMEMORYSTATUS); extern HMODULE WINAPI extLoadLibraryA(LPCTSTR); extern HMODULE WINAPI extLoadLibraryExA(LPCTSTR, HANDLE, DWORD); extern HMODULE WINAPI extLoadLibraryW(LPCWSTR); diff --git a/dll/walkmod.cpp b/dll/walkmod.cpp new file mode 100644 index 0000000..86ad465 --- /dev/null +++ b/dll/walkmod.cpp @@ -0,0 +1,77 @@ +#include +#include +#include +#include "dxwnd.h" +#include "dxwcore.hpp" + +//#include +#include +//#include +//#include "dxwnd.h" + +extern void HookModule(HMODULE, int); +extern void HookOpenGLLibs(HMODULE, char *); +extern void DumpImportTable(HMODULE); + +BOOL ListProcessModules(BOOL hook) +{ + HANDLE hModuleSnap = INVALID_HANDLE_VALUE; + MODULEENTRY32 me32; + + // Take a snapshot of all modules in the specified process. + hModuleSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId()); + if( hModuleSnap == INVALID_HANDLE_VALUE){ + OutTraceD("CreateToolhelp32Snapshot ERROR: err=%d\n", GetLastError()); + return false; + } + + // Set the size of the structure before using it. + me32.dwSize = sizeof( MODULEENTRY32 ); + + // Retrieve information about the first module, + // and exit if unsuccessful + if( !Module32First(hModuleSnap, &me32)){ + OutTraceE("Module32First ERROR: err=%d\n", GetLastError()); // Show cause of failure + CloseHandle(hModuleSnap); // Must clean up the snapshot object! + return false; + } + + // Now walk the module list of the process, + // and display information about each module + do { + if(IsDebug){ + OutTraceD("MODULE NAME:%s\n", me32.szModule ); + OutTraceD(" executable = %s\n", me32.szExePath ); + OutTraceD(" process ID = 0x%08X\n", me32.th32ProcessID ); + OutTraceD(" ref count (g) = 0x%04X\n", me32.GlblcntUsage ); + OutTraceD(" ref count (p) = 0x%04X\n", me32.ProccntUsage ); + OutTraceD(" base address = 0x%08X\n", (DWORD) me32.modBaseAddr ); + OutTraceD(" base size = %d\n", me32.modBaseSize ); + } + + extern void HookSysLibs(HMODULE); + if(hook) HookSysLibs((HMODULE)me32.modBaseAddr); + + // if(strcmp("kernel32.dll", me32.szModule) && ("user32.dll", me32.szModule)) + // HookSysLibs((HMODULE)me32.modBaseAddr); + //} + //DO NOT COMPILE THIS !!!! + //if(hook){ + // //HookModule((HMODULE)me32.modBaseAddr, dxw.dwTargetDDVersion); + // if(!lstrcmpi("OpenGl32.dll", me32.szModule)){ + // MessageBox(0, "Got OpenGl", me32.szModule, MB_OK | MB_ICONEXCLAMATION); + // //HookOpenGLLibs((HMODULE)me32.modBaseAddr, dxw.CustomOpenGLLib); + // } + //} + //if(!strcmp(me32.szModule, "ref_gl.dll")) { + // HookOpenGLLibs((HMODULE)me32.modBaseAddr, dxw.CustomOpenGLLib); + // DumpImportTable((HMODULE)me32.modBaseAddr); + //} + + if (IsDebug) DumpImportTable((HMODULE)me32.modBaseAddr); + } while( Module32Next( hModuleSnap, &me32 ) ); + // Do not forget to clean up the snapshot object. + CloseHandle( hModuleSnap ); + return true; +} + \ No newline at end of file diff --git a/host/Inject.cpp b/host/Inject.cpp new file mode 100644 index 0000000..9ae6c69 --- /dev/null +++ b/host/Inject.cpp @@ -0,0 +1,63 @@ +#include "stdafx.h" +#include +#include +#include +#include +#include + +#define WIN32_LEAN_AND_MEAN + +#define true 1 +#define false 0 + +BOOL Inject(DWORD pID, const char * DLL_NAME) +{ + HANDLE Proc; + char buf[50] = {0}; + LPVOID RemoteString, LoadLibAddy; + if(!pID) return false; + //Proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID); // not working on Win XP + Proc = OpenProcess(PROCESS_CREATE_THREAD|PROCESS_QUERY_INFORMATION|PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE, FALSE, pID); + if(!Proc) + { + sprintf(buf, "OpenProcess() failed: pid=%x err=%d", pID, GetLastError()); + MessageBox(NULL, buf, "Loader", MB_OK); + printf(buf); + return false; + } + LoadLibAddy = (LPVOID)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA"); + // Allocate space in the process for our DLL + RemoteString = (LPVOID)VirtualAllocEx(Proc, NULL, strlen(DLL_NAME), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); + // Write the string name of our DLL in the memory allocated + WriteProcessMemory(Proc, (LPVOID)RemoteString, DLL_NAME, strlen(DLL_NAME), NULL); + // Load our DLL + CreateRemoteThread(Proc, NULL, 0, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, 0, NULL); + CloseHandle(Proc); + return true; +} + +DWORD GetTargetThreadIDFromProcName(const char * ProcName) +{ + PROCESSENTRY32 pe; + HANDLE thSnapShot; + BOOL retval, ProcFound = false; + thSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + if(thSnapShot == INVALID_HANDLE_VALUE) + { + MessageBox(NULL, "Error: Unable to create toolhelp snapshot!", "2MLoader", MB_OK); + //printf("Error: Unable to create toolhelp snapshot!"); + return false; + } + pe.dwSize = sizeof(PROCESSENTRY32); + retval = Process32First(thSnapShot, &pe); + while(retval) + { + if(StrStrI(pe.szExeFile, ProcName)) + { + return pe.th32ProcessID; + } + retval = Process32Next(thSnapShot, &pe); + } + return 0; +} + diff --git a/host/Resource.h b/host/Resource.h index bec78df..f2c00fd 100644 --- a/host/Resource.h +++ b/host/Resource.h @@ -145,6 +145,8 @@ #define IDC_TABPANEL 1090 #define IDC_WINDOWIZE 1091 #define IDC_NOBANNER 1092 +#define IDC_NOBANNER2 1093 +#define IDC_STARTDEBUG 1093 #define ID_MODIFY 32771 #define ID_DELETE 32772 #define ID_ADD 32773 diff --git a/host/TabCompat.cpp b/host/TabCompat.cpp index c274bf3..77880e6 100644 --- a/host/TabCompat.cpp +++ b/host/TabCompat.cpp @@ -43,8 +43,11 @@ END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CTabCompat message handlers -static struct {char bMajor; char bMinor; char *sName;} WinVersions[6]= +static struct {char bMajor; char bMinor; char *sName;} WinVersions[9]= { + {4, 0, "Windows 95"}, + {4,10, "Windows 98/SE"}, + {4,90, "Windows ME"}, {5, 0, "Windows 2000"}, {5, 1, "Windows XP"}, {5, 2, "Windows Server 2003"}, @@ -61,7 +64,7 @@ BOOL CTabCompat::OnInitDialog() int i; List=(CListBox *)this->GetDlgItem(IDC_LISTFAKE); List->ResetContent(); - for(i=0; i<6; i++) List->AddString(WinVersions[i].sName); + for(i=0; i<9; i++) List->AddString(WinVersions[i].sName); List->SetCurSel(cTarget->m_FakeVersion); CDialog::OnInitDialog(); return TRUE; diff --git a/host/TabProgram.cpp b/host/TabProgram.cpp index 7b2898c..f0180e5 100644 --- a/host/TabProgram.cpp +++ b/host/TabProgram.cpp @@ -33,6 +33,7 @@ void CTabProgram::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_UNNOTIFY, cTarget->m_UnNotify); DDX_Check(pDX, IDC_WINDOWIZE, cTarget->m_Windowize); DDX_Check(pDX, IDC_NOBANNER, cTarget->m_NoBanner); + DDX_Check(pDX, IDC_STARTDEBUG, cTarget->m_StartDebug); DDX_Check(pDX, IDC_SAVELOAD, cTarget->m_SaveLoad); DDX_Check(pDX, IDC_HANDLEALTF4, cTarget->m_HandleAltF4); DDX_Text(pDX, IDC_POSX, cTarget->m_PosX); diff --git a/host/TargetDlg.cpp b/host/TargetDlg.cpp index ee343f7..05e15da 100644 --- a/host/TargetDlg.cpp +++ b/host/TargetDlg.cpp @@ -39,6 +39,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) m_UnNotify = FALSE; m_Windowize = TRUE; m_NoBanner = FALSE; + m_StartDebug = FALSE; m_FilePath = _T(""); m_Module = _T(""); m_SaveLoad = FALSE; diff --git a/host/TargetDlg.h b/host/TargetDlg.h index 629ffb9..875918b 100644 --- a/host/TargetDlg.h +++ b/host/TargetDlg.h @@ -42,6 +42,7 @@ public: BOOL m_UnNotify; BOOL m_Windowize; BOOL m_NoBanner; + BOOL m_StartDebug; CString m_FilePath; CString m_Module; CString m_Title; diff --git a/host/dxwndhost.aps b/host/dxwndhost.aps index 15035d3..1152d26 100644 Binary files a/host/dxwndhost.aps and b/host/dxwndhost.aps differ diff --git a/host/dxwndhost.rc b/host/dxwndhost.rc index 8de255c..f82b8e3 100644 --- a/host/dxwndhost.rc +++ b/host/dxwndhost.rc @@ -256,8 +256,9 @@ BEGIN CONTROL "Optimize CPU (DirectX1 - 7)",IDC_SAVELOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,122,123,12 CONTROL "Intercept Alt-F4 key",IDC_HANDLEALTF4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,132,109,12 CONTROL "Run in Window",IDC_WINDOWIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,142,124,12 - GROUPBOX "Generic",IDC_STATIC,7,103,140,72 + GROUPBOX "Generic",IDC_STATIC,7,103,140,75 CONTROL "No banner",IDC_NOBANNER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,152,124,12 + CONTROL "use DLL Injection",IDC_STARTDEBUG,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,16,162,124,12 END IDD_TAB_LOG DIALOGEX 0, 0, 300, 240 diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo index 1cb3ed0..f6abdfe 100644 Binary files a/host/dxwndhost.vs2008.suo and b/host/dxwndhost.vs2008.suo differ diff --git a/host/dxwndhost.vs2008.vcproj b/host/dxwndhost.vs2008.vcproj index b4870bd..1f25bdd 100644 --- a/host/dxwndhost.vs2008.vcproj +++ b/host/dxwndhost.vs2008.vcproj @@ -148,7 +148,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../Include" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS; PSAPI_VERSION=1" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -179,6 +179,7 @@ OutputFile="../Debug/dxwnd.exe" LinkIncremental="2" SuppressStartupBanner="true" + AddModuleNamesToAssembly="" GenerateDebugInformation="true" ProgramDatabaseFile=".\Debug/dxwnd.pdb" SubSystem="2" @@ -302,6 +303,14 @@ /> + + + + diff --git a/host/dxwndhostView.cpp b/host/dxwndhostView.cpp index a40fd95..f07a252 100644 --- a/host/dxwndhostView.cpp +++ b/host/dxwndhostView.cpp @@ -374,6 +374,7 @@ void CDxwndhostView::OnModify() dlg.m_UnNotify = TargetMaps[i].flags & UNNOTIFY ? 1 : 0; dlg.m_Windowize = TargetMaps[i].flags2 & WINDOWIZE ? 1 : 0; dlg.m_NoBanner = TargetMaps[i].flags2 & NOBANNER ? 1 : 0; + dlg.m_StartDebug = TargetMaps[i].flags2 & STARTDEBUG ? 1 : 0; dlg.m_EmulateSurface = TargetMaps[i].flags & EMULATESURFACE ? 1 : 0; dlg.m_NoEmulateSurface = TargetMaps[i].flags & EMULATEFLAGS ? 0 : 1; dlg.m_EmulateBuffer = TargetMaps[i].flags & EMULATEBUFFER ? 1 : 0; @@ -465,6 +466,7 @@ void CDxwndhostView::OnModify() if(dlg.m_UnNotify) TargetMaps[i].flags |= UNNOTIFY; if(dlg.m_Windowize) TargetMaps[i].flags2 |= WINDOWIZE; if(dlg.m_NoBanner) TargetMaps[i].flags2 |= NOBANNER; + if(dlg.m_StartDebug) TargetMaps[i].flags2 |= STARTDEBUG; if(dlg.m_NoEmulateSurface) { dlg.m_EmulateSurface = FALSE; dlg.m_EmulateBuffer = FALSE; @@ -763,6 +765,7 @@ void CDxwndhostView::OnAdd() if(dlg.m_UnNotify) TargetMaps[i].flags |= UNNOTIFY; if(dlg.m_Windowize) TargetMaps[i].flags2 |= WINDOWIZE; if(dlg.m_NoBanner) TargetMaps[i].flags2 |= NOBANNER; + if(dlg.m_StartDebug) TargetMaps[i].flags2 |= STARTDEBUG; if(dlg.m_NoEmulateSurface) { dlg.m_EmulateSurface = FALSE; dlg.m_EmulateBuffer = FALSE; @@ -1144,6 +1147,107 @@ void CDxwndhostView::OnRButtonDown(UINT nFlags, CPoint point) CListView::OnRButtonDown(nFlags, point); } +// For thread messaging +#define DEBUG_EVENT_MESSAGE WM_APP + 0x100 + +HWND Ghwnd; + +DWORD WINAPI StartDebug(void *p) +{ + TARGETMAP *TargetMap; + STARTUPINFO sinfo; + PROCESS_INFORMATION pinfo, *pi; + CREATE_THREAD_DEBUG_INFO *ti; + LOAD_DLL_DEBUG_INFO *li; + char path[MAX_PATH]; + BOOL step=FALSE; // initialize to TRUE to enable + extern char *GetFileNameFromHandle(HANDLE); + + TargetMap=(TARGETMAP *)p; + ZeroMemory(&sinfo, sizeof(sinfo)); + sinfo.cb = sizeof(sinfo); + strcpy_s(path, sizeof(path), TargetMap->path); + PathRemoveFileSpec(path); + CreateProcess(NULL, TargetMap->path, 0, 0, false, DEBUG_ONLY_THIS_PROCESS, NULL, path, &sinfo, &pinfo); + CString strEventMessage; + DEBUG_EVENT debug_event ={0}; + bool bContinueDebugging = true; + DWORD dwContinueStatus = DBG_CONTINUE; + while(bContinueDebugging) + { + int res; + char DebugMessage[256+1]; + if (!WaitForDebugEvent(&debug_event, INFINITE)) return TRUE; + switch(debug_event.dwDebugEventCode){ + case EXIT_PROCESS_DEBUG_EVENT: + SetWindowText(Ghwnd, "EXIT PROCESS"); + bContinueDebugging=false; + break; + case CREATE_PROCESS_DEBUG_EVENT: + if(step){ + pi=(PROCESS_INFORMATION *)&debug_event.u; + sprintf(DebugMessage, "CREATE PROCESS hProcess=%x dwProcessId=%x path=%s", + pi->hProcess, pi->dwProcessId, GetFileNameFromHandle(pi->hProcess)); + res=MessageBoxEx(0, DebugMessage, "Continue stepping?", MB_YESNO | MB_ICONQUESTION, NULL); + if(res!=IDYES) step=FALSE; + } + if(1){ + // DLL injection: + char buf[MAX_PATH] = {0}; + BOOL Injected; + extern BOOL Inject(DWORD, const char *); + GetFullPathName("dxinj.dll", MAX_PATH, buf, NULL); + Injected=Inject(pinfo.dwProcessId, buf); + if(!Injected){ + sprintf(DebugMessage,"Injection error: pid=%x dll=%s", pinfo.dwProcessId, buf); + MessageBoxEx(0, DebugMessage, "Injection", MB_ICONEXCLAMATION, NULL); + } + // end of DLL injection + } + break; + case CREATE_THREAD_DEBUG_EVENT: + if(step){ + ti=(CREATE_THREAD_DEBUG_INFO *)&debug_event.u; + sprintf(DebugMessage, "CREATE THREAD hThread=%x lpThreadLocalBase=%x lpStartAddress=%x", + ti->hThread, ti->lpThreadLocalBase, ti->lpStartAddress); + res=MessageBoxEx(0, DebugMessage, "Continue stepping?", MB_YESNO | MB_ICONQUESTION, NULL); + if(res!=IDYES) step=FALSE; + } + break; + case EXIT_THREAD_DEBUG_EVENT: + SetWindowText(Ghwnd, "EXIT THREAD"); + break; + case LOAD_DLL_DEBUG_EVENT: + if(step){ + li=(LOAD_DLL_DEBUG_INFO *)&debug_event.u; + sprintf(DebugMessage, "LOAD DLL hFile=%x path=%s", + li->hFile, GetFileNameFromHandle(li->hFile)); + res=MessageBoxEx(0, DebugMessage, "Continue stepping?", MB_YESNO | MB_ICONQUESTION, NULL); + if(res!=IDYES) step=FALSE; + } + break; + case UNLOAD_DLL_DEBUG_EVENT: + SetWindowText(Ghwnd, "UNLOAD DLL"); + break; + case OUTPUT_DEBUG_STRING_EVENT: + SetWindowText(Ghwnd, "OUT STRING"); + break; + case EXCEPTION_DEBUG_EVENT: + SetWindowText(Ghwnd, "EXCEPTION"); + break; + default: + break; + } + SendMessage(Ghwnd, DEBUG_EVENT_MESSAGE, (WPARAM) &strEventMessage, debug_event.dwDebugEventCode); + ContinueDebugEvent(debug_event.dwProcessId, + debug_event.dwThreadId, + dwContinueStatus); + // Reset + dwContinueStatus = DBG_CONTINUE; + } + return TRUE; +} + void CDxwndhostView::OnRun() { CListCtrl& listctrl = GetListCtrl(); @@ -1152,6 +1256,7 @@ void CDxwndhostView::OnRun() STARTUPINFO sinfo; PROCESS_INFORMATION pinfo; char path[MAX_PATH]; + //extern CString GetFileNameFromHandle(HANDLE); if(!listctrl.GetSelectedCount()) return; pos = listctrl.GetFirstSelectedItemPosition(); @@ -1160,5 +1265,11 @@ void CDxwndhostView::OnRun() sinfo.cb = sizeof(sinfo); strcpy_s(path, sizeof(path), TargetMaps[i].path); PathRemoveFileSpec(path); - CreateProcess(0, TargetMaps[i].path, 0, 0, 0, CREATE_DEFAULT_ERROR_MODE, 0, path, &sinfo, &pinfo); + if(TargetMaps[i].flags2 & STARTDEBUG){ + Ghwnd=this->m_hWnd; + CreateThread( NULL, 0, StartDebug, &TargetMaps[i], 0, NULL); + } + else{ + CreateProcess(NULL, TargetMaps[i].path, 0, 0, false, CREATE_DEFAULT_ERROR_MODE, NULL, path, &sinfo, &pinfo); + } } diff --git a/host/getfname.cpp b/host/getfname.cpp new file mode 100644 index 0000000..3193929 --- /dev/null +++ b/host/getfname.cpp @@ -0,0 +1,78 @@ +#include "stdafx.h" +#include +#include +#include + +#include "shlwapi.h" + +#define BUFSIZE 512 + +//Cstring GetFileNameFromHandle(HANDLE hFile) +char *GetFileNameFromHandle(HANDLE hFile) +{ + BOOL bSuccess = FALSE; + TCHAR pszFilename[MAX_PATH+1]; + HANDLE hFileMap; + //CString strFilename; + static char strFilename[MAX_PATH+1]; + // Get the file size. + DWORD dwFileSizeHi = 0; + DWORD dwFileSizeLo = GetFileSize(hFile, &dwFileSizeHi); + if( dwFileSizeLo == 0 && dwFileSizeHi == 0 ) return FALSE; + typedef DWORD (WINAPI *GetMappedFileName_Type)(HANDLE, LPVOID, LPTSTR, DWORD); + static GetMappedFileName_Type pGetMappedFileName = NULL; + + if(!pGetMappedFileName) do { // fake loop + HMODULE lib; + // Psapi.dll (if PSAPI_VERSION=1) on Windows 7 and Windows Server 2008 R2; + // Psapi.dll on Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP + lib=LoadLibrary("Psapi.dll"); + pGetMappedFileName=(GetMappedFileName_Type)GetProcAddress(lib,"GetMappedFileNameA"); + if(pGetMappedFileName) break; + // Kernel32.dll on Windows 7 and Windows Server 2008 R2; + FreeLibrary(lib); + lib=LoadLibrary("Kernel32.dll"); + pGetMappedFileName=(GetMappedFileName_Type)GetProcAddress(lib,"GetMappedFileNameA"); + if(!pGetMappedFileName) return NULL; + } while(FALSE); + + // Create a file mapping object. + hFileMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 1, NULL); + if (hFileMap) { + // Create a file mapping to get the file name. + void* pMem = MapViewOfFile(hFileMap, FILE_MAP_READ, 0, 0, 1); + if (pMem) { + if ((*pGetMappedFileName) (GetCurrentProcess(), pMem, pszFilename, MAX_PATH)){ + // Translate path with device name to drive letters. + TCHAR szTemp[BUFSIZE]; + szTemp[0] = '\0'; + if (GetLogicalDriveStrings(BUFSIZE-1, szTemp)) { + TCHAR szName[MAX_PATH]; + TCHAR szDrive[3] = TEXT(" :"); + BOOL bFound = FALSE; + TCHAR* p = szTemp; + do { + // Copy the drive letter to the template string + *szDrive = *p; + // Look up each device name + if (QueryDosDevice(szDrive, szName, MAX_PATH)){ + size_t uNameLen = _tcslen(szName); + if (uNameLen < MAX_PATH) { + bFound = _tcsnicmp(pszFilename, szName, uNameLen) == 0; + //if (bFound) strFilename.Format(L"%s%s",szDrive, pszFilename+uNameLen); + if (bFound) sprintf(strFilename, "%s%s", szDrive, pszFilename+uNameLen); + } + } + // Go to the next NULL character. + while (*p++); + } while (!bFound && *p); // end of string + } + } + bSuccess = TRUE; + UnmapViewOfFile(pMem); + } + CloseHandle(hFileMap); + } + return(strFilename); +} + diff --git a/makebuild.bat b/makebuild.bat deleted file mode 100644 index 4b901f5..0000000 --- a/makebuild.bat +++ /dev/null @@ -1,17 +0,0 @@ -del dll\dxwnd.*.user -del dll\dxwnd.*.ncb - -del host\dxwndhost.*.user -del host\dxwndhost.*.ncb - -copy Release\dxwnd.exe build -copy Release\dxwnd.dll build - -del dll\Debug\*.* -del dll\Release\*.* - -del host\Debug\*.* -del host\Release\*.* - -echo build done -pause