1
0
mirror of https://github.com/DxWnd/DxWnd.reloaded synced 2024-12-30 09:25:35 +01:00

v2_04_18_src

Former-commit-id: a236d8102f7cf07342c20cc701e08f30e8f4f142
This commit is contained in:
gho tik 2017-03-04 11:50:32 -05:00 committed by Refael ACkermann
parent de4d2e231d
commit db2398ce2e
40 changed files with 4134 additions and 76 deletions

View File

@ -279,6 +279,8 @@
#define ZBUFFERHARDCLEAN 0x08000000 // Clean ZBUFFER the hard way (memset 0xFF on whole surface buffer ....) #define ZBUFFERHARDCLEAN 0x08000000 // Clean ZBUFFER the hard way (memset 0xFF on whole surface buffer ....)
#define LOADLIBRARYERR 0x10000000 // When LoadLibrary* fail for missing file returns ... instead of .... #define LOADLIBRARYERR 0x10000000 // When LoadLibrary* fail for missing file returns ... instead of ....
#define SHAREDDCHYBRID 0x20000000 // Hybrid mode for shared dc GDI emulation - blits both on ddraw surface and window surface #define SHAREDDCHYBRID 0x20000000 // Hybrid mode for shared dc GDI emulation - blits both on ddraw surface and window surface
#define FIXADJUSTWINRECT 0x40000000 // Hybrid mode for shared dc GDI emulation - blits both on ddraw surface and window surface
#define HOOKDLGWIN 0x80000000 // Hook dialog WindowProc
// 9th flags DWORD dxw.dwFlags9: // 9th flags DWORD dxw.dwFlags9:
// 10th flags DWORD dxw.dwFlags10: // 10th flags DWORD dxw.dwFlags10:

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:66c9cb4107758dceb3b65f8f4c1422c950197c50f039e41ff421489b1e5128ac oid sha256:bc9cd4434c5e1cc62759f1f396ddf04187cadd462517a54e81b74f3c57e61ba9
size 794112 size 797184

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:f46151918909f2ce7b12958e32290a0173cd6e56e3471c371f4f3db4d9eecc67 oid sha256:ac09abd75ae8f05f413982233724599a86ba349074cf526bea61ad724e15062e
size 707584 size 707584

153
build/dxwnd.ini Normal file
View File

@ -0,0 +1,153 @@
[target]
maxres147=0
swapeffect147=0
maxddinterface147=7
slowratio147=1
scanline147=1
initresw147=0
initresh147=0
title148=State of War Warmonger
path148=D:\Games\State of War Warmonger\State of War - Warmonger.exe
startfolder148=
launchpath148=
module148=
opengllib148=
notes148=
registry148=
ver148=0
monitorid148=0
coord148=0
flag148=134234210
flagg148=134217728
flagh148=532
flagi148=4
flagj148=0
flagk148=0
flagl148=0
flagm148=0
tflag148=0
dflag148=0
posx148=50
posy148=50
sizx148=800
sizy148=600
maxfps148=0
initts148=0
winver148=0
maxres148=-1
swapeffect148=0
maxddinterface148=7
slowratio148=1
scanline148=1
initresw148=0
initresh148=0
title149=STCC Swedish TouringCar Championship
path149=D:\Games\STCC\STCC.exe
startfolder149=
launchpath149=
module149=
opengllib149=
notes149=Still slow and choppy in emulation mode
registry149=
ver149=0
monitorid149=0
coord149=0
flag149=136314914
flagg149=1207959552
flagh149=20
flagi149=138412036
flagj149=4256
flagk149=0
flagl149=0
flagm149=0
tflag149=0
dflag149=0
posx149=50
posy149=50
sizx149=800
sizy149=600
maxfps149=0
initts149=0
winver149=0
maxres149=-1
swapeffect149=0
maxddinterface149=7
slowratio149=1
scanline149=1
initresw149=0
initresh149=0
title150=Steel Saviour demo (T-Zwei)
path150=D:\Games\T-Zwei\TZwei.exe
startfolder150=
launchpath150=
module150=
opengllib150=
notes150=
registry150=
ver150=8
monitorid150=0
coord150=0
flag150=136314914
flagg150=1744961536
flagh150=20
flagi150=138412036
flagj150=4224
flagk150=65536
flagl150=0
flagm150=0
tflag150=0
dflag150=0
posx150=50
posy150=50
sizx150=800
sizy150=600
maxfps150=0
initts150=0
winver150=0
maxres150=-1
swapeffect150=0
maxddinterface150=7
slowratio150=2
scanline150=1
initresw150=0
initresh150=0
title151=Steel Saviour
path151=D:\Games\Steel Saviour\SteelSaviour.exe
startfolder151=
launchpath151=
module151=
opengllib151=
notes151=
registry151=
ver151=8
monitorid151=0
coord151=0
flag151=136314922
flagg151=1744961536
flagh151=20
flagi151=138412036
flagj151=4224
flagk151=65536
flagl151=0
flagm151=0
tflag151=0
dflag151=0
posx151=50
posy151=50
sizx151=800
sizy151=600
maxfps151=0
initts151=0
winver151=0
maxres151=-1
swapeffect151=0
maxddinterface151=7
slowratio151=2
scanline151=1
initresw151=0
initresh151=0
[window]
posx=1045
posy=520
sizx=320
sizy=200

7
build/dxwnd.reg Normal file
View File

@ -0,0 +1,7 @@
[HKEY_LOCAL_MACHINE\SOFTWARE\Metropolis]
[HKEY_LOCAL_MACHINE\SOFTWARE\Metropolis\RoboRumble]
"Directory"=".\\"

View File

@ -1,6 +1,6 @@
[target] [target]
title0=Imperialism title0=Imperialism
path0=G:\Games\Imperialism\Imperialism.exe path0=D:\Games\Imperialism\Imperialism.exe
startfolder0= startfolder0=
launchpath0= launchpath0=
module0= module0=
@ -9,13 +9,13 @@ notes0=
registry0= registry0=
ver0=0 ver0=0
coord0=0 coord0=0
flag0=1746935843 flag0=681582627
flagg0=1209008128 flagg0=1209008128
flagh0=20 flagh0=20
flagi0=4194308 flagi0=4194308
flagj0=128 flagj0=128
flagk0=0 flagk0=0
flagl0=0 flagl0=268435456
flagm0=0 flagm0=0
tflag0=0 tflag0=0
dflag0=0 dflag0=0
@ -30,3 +30,7 @@ maxres0=-1
swapeffect0=0 swapeffect0=0
maxddinterface0=7 maxddinterface0=7
slowratio0=1 slowratio0=1
monitorid0=0
scanline0=1
initresw0=0
initresh0=0

View File

@ -8,7 +8,7 @@ notes0=
registry0= registry0=
ver0=0 ver0=0
coord0=0 coord0=0
flag0=136314914 flag0=673185826
flagg0=1207959552 flagg0=1207959552
flagh0=20 flagh0=20
flagi0=138412036 flagi0=138412036
@ -29,3 +29,8 @@ maxres0=-1
swapeffect0=0 swapeffect0=0
maxddinterface0=7 maxddinterface0=7
slowratio0=2 slowratio0=2
startfolder0=
monitorid0=0
scanline0=1
initresw0=0
initresh0=0

View File

@ -8,12 +8,12 @@ notes0=
registry0= registry0=
ver0=0 ver0=0
coord0=0 coord0=0
flag0=136314914 flag0=673185858
flagg0=1207959552 flagg0=1207959552
flagh0=20 flagh0=20
flagi0=138412036 flagi0=205520900
flagj0=4224 flagj0=4232
flagk0=327680 flagk0=65536
tflag0=0 tflag0=0
initx0=0 initx0=0
inity0=0 inity0=0
@ -28,5 +28,15 @@ sizy0=600
maxfps0=0 maxfps0=0
initts0=0 initts0=0
winver0=0 winver0=0
maxres0=-1 maxres0=0
swapeffect0=0 swapeffect0=0
startfolder0=
monitorid0=-1
flagl0=0
flagm0=0
dflag0=0
maxddinterface0=7
slowratio0=2
scanline0=0
initresw0=800
initresh0=600

View File

@ -0,0 +1,36 @@
[target]
title0=Puzzle Agent Nelson Tethers
path0=D:\Games\Puzzle Agent\Grickle101.exe
startfolder0=
launchpath0=
module0=
opengllib0=
notes0=
registry0=
ver0=0
monitorid0=-1
coord0=0
flag0=673185826
flagg0=1207959552
flagh0=20
flagi0=138412036
flagj0=4224
flagk0=65536
flagl0=0
flagm0=0
tflag0=0
dflag0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=0
swapeffect0=0
maxddinterface0=7
slowratio0=2
scanline0=0
initresw0=800
initresh0=600

View File

@ -7,9 +7,9 @@ opengllib0=
notes0= notes0=
ver0=0 ver0=0
coord0=0 coord0=0
flag0=136331298 flag0=673202210
flagg0=1207959552 flagg0=1208221696
flagh0=20 flagh0=8212
flagi0=138412036 flagi0=138412036
flagj0=4224 flagj0=4224
flagk0=0 flagk0=0
@ -29,3 +29,14 @@ initts0=0
winver0=0 winver0=0
maxres0=-1 maxres0=-1
swapeffect0=0 swapeffect0=0
startfolder0=
registry0=
monitorid0=0
flagl0=0
flagm0=5
dflag0=0
maxddinterface0=7
slowratio0=1
scanline0=1
initresw0=0
initresh0=0

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:3ed113b19339a8f63d6ae25dfb0ed2e78b90369c80c3ddf16e507230f34a15da oid sha256:02734351a074f0841d7950dcffa899ef9ea8244adc091c75420ce35084a8c493
size 54784 size 54784

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:6ef0610692cc6fdcc6f1b8260e118c5974cd93e9fb41dd5070e1e30fb40956d3 oid sha256:b0e7df7744771bac778ed41fc7ba6d7b521dfe25c3f0bf1adb88189574baa310
size 55808 size 55808

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:eb3a493b93714ec278186cdf8e71228e843b8681df6278f5da5cedb419f70e14 oid sha256:ed62dc9fb4d6b5674588125c6988fdb3755b00185bc556f1d6a852522a28a078
size 56320 size 56832

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:036a87972d467d27ac66fbb0b52bccfb1f41d9a6e0ac949a94e013520c086e14 oid sha256:c12a59ded76bb5b7d05fca391a31662eca1e884629e11c8816a299088f6346d1
size 55808 size 55808

View File

@ -1571,3 +1571,8 @@ fix: check on ZBUFFER capability attribution in case the capsdb holds a wrong ca
add: "Fix LoadLibrary error" flag (LOADLIBRARYERR) to return ERROR_DLL_NOT_FOUND instead of ERROR_MOD_NOT_FOUND error code. Fixes "Nightmare Creatures". add: "Fix LoadLibrary error" flag (LOADLIBRARYERR) to return ERROR_DLL_NOT_FOUND instead of ERROR_MOD_NOT_FOUND error code. Fixes "Nightmare Creatures".
add: "Hybrid" flag for "Shared ddraw & GDI DC" mode - reduces "Star Treck: Armada" problems. add: "Hybrid" flag for "Shared ddraw & GDI DC" mode - reduces "Star Treck: Armada" problems.
v2.04.18
add: "Fix AdjustWindowRect" flag (FIXADJUSTWINDOWRECT) to selectively turn the AdjustWindowRect coordinate patching. The flag must be checked for "Man TT Super Bike" and unckecked for "Imperialism II".
add: "Hook child WindowProc" and "Hook dialog WindowProc" flags for better control over these risky operations.
fix: bad GetParent hook: caused crash when checking "Hook child WindowProc" flag.
fix: improvements in "Hybrid" emulation mode

View File

@ -275,6 +275,16 @@ HRESULT WINAPI extAddOverlayDirtyRect2(LPDIRECTDRAWSURFACE, LPRECT);
HRESULT WINAPI extAddOverlayDirtyRect3(LPDIRECTDRAWSURFACE, LPRECT); HRESULT WINAPI extAddOverlayDirtyRect3(LPDIRECTDRAWSURFACE, LPRECT);
HRESULT WINAPI extAddOverlayDirtyRect4(LPDIRECTDRAWSURFACE, LPRECT); HRESULT WINAPI extAddOverlayDirtyRect4(LPDIRECTDRAWSURFACE, LPRECT);
HRESULT WINAPI extAddOverlayDirtyRect7(LPDIRECTDRAWSURFACE, LPRECT); HRESULT WINAPI extAddOverlayDirtyRect7(LPDIRECTDRAWSURFACE, LPRECT);
HRESULT WINAPI extGetOverlayPosition1(LPDIRECTDRAWSURFACE, LPLONG, LPLONG);
HRESULT WINAPI extGetOverlayPosition2(LPDIRECTDRAWSURFACE, LPLONG, LPLONG);
HRESULT WINAPI extGetOverlayPosition3(LPDIRECTDRAWSURFACE, LPLONG, LPLONG);
HRESULT WINAPI extGetOverlayPosition4(LPDIRECTDRAWSURFACE, LPLONG, LPLONG);
HRESULT WINAPI extGetOverlayPosition7(LPDIRECTDRAWSURFACE, LPLONG, LPLONG);
HRESULT WINAPI extSetOverlayPosition1(LPDIRECTDRAWSURFACE, LONG, LONG);
HRESULT WINAPI extSetOverlayPosition2(LPDIRECTDRAWSURFACE, LONG, LONG);
HRESULT WINAPI extSetOverlayPosition3(LPDIRECTDRAWSURFACE, LONG, LONG);
HRESULT WINAPI extSetOverlayPosition4(LPDIRECTDRAWSURFACE, LONG, LONG);
HRESULT WINAPI extSetOverlayPosition7(LPDIRECTDRAWSURFACE, LONG, LONG);
extern HRESULT WINAPI extCreateSurface(int, CreateSurface_Type, LPDIRECTDRAW, DDSURFACEDESC2 *, LPDIRECTDRAWSURFACE *, void *); extern HRESULT WINAPI extCreateSurface(int, CreateSurface_Type, LPDIRECTDRAW, DDSURFACEDESC2 *, LPDIRECTDRAWSURFACE *, void *);
HRESULT WINAPI extSetSurfaceDesc3(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, DWORD); HRESULT WINAPI extSetSurfaceDesc3(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, DWORD);
@ -370,7 +380,8 @@ GetClipper_Type pGetClipper;
GetColorKey_Type pGetColorKey1, pGetColorKey2, pGetColorKey3, pGetColorKey4, pGetColorKey7; GetColorKey_Type pGetColorKey1, pGetColorKey2, pGetColorKey3, pGetColorKey4, pGetColorKey7;
GetDC_Type pGetDC1, pGetDC2, pGetDC3, pGetDC4, pGetDC7; GetDC_Type pGetDC1, pGetDC2, pGetDC3, pGetDC4, pGetDC7;
GetFlipStatus_Type pGetFlipStatus; GetFlipStatus_Type pGetFlipStatus;
GetOverlayPosition_Type pGetOverlayPosition; GetOverlayPosition_Type pGetOverlayPosition1, pGetOverlayPosition2, pGetOverlayPosition3, pGetOverlayPosition4, pGetOverlayPosition7;
SetOverlayPosition_Type pSetOverlayPosition1, pSetOverlayPosition2, pSetOverlayPosition3, pSetOverlayPosition4, pSetOverlayPosition7;
GetPalette_Type pGetPalette1, pGetPalette2, pGetPalette3, pGetPalette4, pGetPalette7; GetPalette_Type pGetPalette1, pGetPalette2, pGetPalette3, pGetPalette4, pGetPalette7;
GetPixelFormat_Type pGetPixelFormat1, pGetPixelFormat2, pGetPixelFormat3, pGetPixelFormat4, pGetPixelFormat7; GetPixelFormat_Type pGetPixelFormat1, pGetPixelFormat2, pGetPixelFormat3, pGetPixelFormat4, pGetPixelFormat7;
GetSurfaceDesc_Type pGetSurfaceDesc1, pGetSurfaceDesc2, pGetSurfaceDesc3; GetSurfaceDesc_Type pGetSurfaceDesc1, pGetSurfaceDesc2, pGetSurfaceDesc3;
@ -1380,12 +1391,14 @@ void HookDDSurface(LPDIRECTDRAWSURFACE *lplpdds, int dxversion, BOOL isPrim)
SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps1S, (void **)&pGetCaps1S, "GetCaps(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps1S, (void **)&pGetCaps1S, "GetCaps(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey1, (void **)&pGetColorKey1, "GetColorKey(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey1, (void **)&pGetColorKey1, "GetColorKey(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC1, (void **)&pGetDC1, "GetDC(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC1, (void **)&pGetDC1, "GetDC(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 76), extGetOverlayPosition1, (void **)&pGetOverlayPosition1, "GetOverlayPosition(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette1, (void **)&pGetPalette1, "GetPalette(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette1, (void **)&pGetPalette1, "GetPalette(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat1, (void **)&pGetPixelFormat1, "GetPixelFormat(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat1, (void **)&pGetPixelFormat1, "GetPixelFormat(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc1, (void **)&pGetSurfaceDesc1, "GetSurfaceDesc(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc1, (void **)&pGetSurfaceDesc1, "GetSurfaceDesc(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock1 : extLockDir1, (void **)&pLock1, "Lock(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock1 : extLockDir1, (void **)&pLock1, "Lock(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock1 : extUnlockDir1, (void **)&pUnlock1, "Unlock(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock1 : extUnlockDir1, (void **)&pUnlock1, "Unlock(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC1, (void **)&pReleaseDC1, "ReleaseDC(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC1, (void **)&pReleaseDC1, "ReleaseDC(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 120), extSetOverlayPosition1, (void **)&pSetOverlayPosition1, "SetOverlayPosition(S1)");
SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette1, (void **)&pSetPalette1, "SetPalette(S1)"); SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette1, (void **)&pSetPalette1, "SetPalette(S1)");
break; break;
case 2: case 2:
@ -1403,12 +1416,14 @@ void HookDDSurface(LPDIRECTDRAWSURFACE *lplpdds, int dxversion, BOOL isPrim)
SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps2S, (void **)&pGetCaps2S, "GetCaps(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps2S, (void **)&pGetCaps2S, "GetCaps(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey2, (void **)&pGetColorKey2, "GetColorKey(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey2, (void **)&pGetColorKey2, "GetColorKey(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC2, (void **)&pGetDC2, "GetDC(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC2, (void **)&pGetDC2, "GetDC(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 76), extGetOverlayPosition2, (void **)&pGetOverlayPosition2, "GetOverlayPosition(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette2, (void **)&pGetPalette2, "GetPalette(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette2, (void **)&pGetPalette2, "GetPalette(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat2, (void **)&pGetPixelFormat2, "GetPixelFormat(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat2, (void **)&pGetPixelFormat2, "GetPixelFormat(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc2, (void **)&pGetSurfaceDesc2, "GetSurfaceDesc(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc2, (void **)&pGetSurfaceDesc2, "GetSurfaceDesc(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock2 : extLockDir2, (void **)&pLock2, "Lock(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock2 : extLockDir2, (void **)&pLock2, "Lock(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock2 : extUnlockDir2, (void **)&pUnlock2, "Unlock(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock2 : extUnlockDir2, (void **)&pUnlock2, "Unlock(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC2, (void **)&pReleaseDC2, "ReleaseDC(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC2, (void **)&pReleaseDC2, "ReleaseDC(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 120), extSetOverlayPosition2, (void **)&pSetOverlayPosition2, "SetOverlayPosition(S2)");
SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette2, (void **)&pSetPalette2, "SetPalette(S2)"); SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette2, (void **)&pSetPalette2, "SetPalette(S2)");
break; break;
case 3: case 3:
@ -1426,12 +1441,14 @@ void HookDDSurface(LPDIRECTDRAWSURFACE *lplpdds, int dxversion, BOOL isPrim)
SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps3S, (void **)&pGetCaps3S, "GetCaps(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps3S, (void **)&pGetCaps3S, "GetCaps(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey3, (void **)&pGetColorKey3, "GetColorKey(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey3, (void **)&pGetColorKey3, "GetColorKey(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC3, (void **)&pGetDC3, "GetDC(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC3, (void **)&pGetDC3, "GetDC(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 76), extGetOverlayPosition3, (void **)&pGetOverlayPosition3, "GetOverlayPosition(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette3, (void **)&pGetPalette3, "GetPalette(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette3, (void **)&pGetPalette3, "GetPalette(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat3, (void **)&pGetPixelFormat3, "GetPixelFormat(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat3, (void **)&pGetPixelFormat3, "GetPixelFormat(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc3, (void **)&pGetSurfaceDesc3, "GetSurfaceDesc(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc3, (void **)&pGetSurfaceDesc3, "GetSurfaceDesc(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock3 : extLockDir3, (void **)&pLock3, "Lock(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock3 : extLockDir3, (void **)&pLock3, "Lock(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock3 : extUnlockDir3, (void **)&pUnlock3, "Unlock(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock3 : extUnlockDir3, (void **)&pUnlock3, "Unlock(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC3, (void **)&pReleaseDC3, "ReleaseDC(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC3, (void **)&pReleaseDC3, "ReleaseDC(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 120), extSetOverlayPosition3, (void **)&pSetOverlayPosition3, "SetOverlayPosition(S3)");
SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette3, (void **)&pSetPalette3, "SetPalette(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette3, (void **)&pSetPalette3, "SetPalette(S3)");
// added in interface version 3 // added in interface version 3
SetHook((void *)(**(DWORD **)lplpdds + 156), extSetSurfaceDesc3, (void **)&pSetSurfaceDesc3, "SetSurfaceDesc(S3)"); SetHook((void *)(**(DWORD **)lplpdds + 156), extSetSurfaceDesc3, (void **)&pSetSurfaceDesc3, "SetSurfaceDesc(S3)");
@ -1451,12 +1468,14 @@ void HookDDSurface(LPDIRECTDRAWSURFACE *lplpdds, int dxversion, BOOL isPrim)
SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps4S, (void **)&pGetCaps4S, "GetCaps(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps4S, (void **)&pGetCaps4S, "GetCaps(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey4, (void **)&pGetColorKey4, "GetColorKey(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey4, (void **)&pGetColorKey4, "GetColorKey(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC4, (void **)&pGetDC4, "GetDC(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC4, (void **)&pGetDC4, "GetDC(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 76), extGetOverlayPosition4, (void **)&pGetOverlayPosition4, "GetOverlayPosition(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette4, (void **)&pGetPalette4, "GetPalette(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette4, (void **)&pGetPalette4, "GetPalette(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat4, (void **)&pGetPixelFormat4, "GetPixelFormat(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat4, (void **)&pGetPixelFormat4, "GetPixelFormat(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc4, (void **)&pGetSurfaceDesc4, "GetSurfaceDesc(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc4, (void **)&pGetSurfaceDesc4, "GetSurfaceDesc(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock4 : extLockDir4, (void **)&pLock4, "Lock(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock4 : extLockDir4, (void **)&pLock4, "Lock(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock4 : extUnlockDir4, (void **)&pUnlock4, "Unlock(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock4 : extUnlockDir4, (void **)&pUnlock4, "Unlock(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC4, (void **)&pReleaseDC4, "ReleaseDC(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC4, (void **)&pReleaseDC4, "ReleaseDC(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 120), extSetOverlayPosition4, (void **)&pSetOverlayPosition4, "SetOverlayPosition(S4)");
SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette4, (void **)&pSetPalette4, "SetPalette(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette4, (void **)&pSetPalette4, "SetPalette(S4)");
// added in interface version 3 // added in interface version 3
SetHook((void *)(**(DWORD **)lplpdds + 156), extSetSurfaceDesc4, (void **)&pSetSurfaceDesc4, "SetSurfaceDesc(S4)"); SetHook((void *)(**(DWORD **)lplpdds + 156), extSetSurfaceDesc4, (void **)&pSetSurfaceDesc4, "SetSurfaceDesc(S4)");
@ -1476,12 +1495,14 @@ void HookDDSurface(LPDIRECTDRAWSURFACE *lplpdds, int dxversion, BOOL isPrim)
SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps7S, (void **)&pGetCaps7S, "GetCaps(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps7S, (void **)&pGetCaps7S, "GetCaps(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey7, (void **)&pGetColorKey7, "GetColorKey(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey7, (void **)&pGetColorKey7, "GetColorKey(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC7, (void **)&pGetDC7, "GetDC(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC7, (void **)&pGetDC7, "GetDC(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 76), extGetOverlayPosition7, (void **)&pGetOverlayPosition7, "GetOverlayPosition(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette7, (void **)&pGetPalette7, "GetPalette(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette7, (void **)&pGetPalette7, "GetPalette(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat7, (void **)&pGetPixelFormat7, "GetPixelFormat(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat7, (void **)&pGetPixelFormat7, "GetPixelFormat(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc7, (void **)&pGetSurfaceDesc7, "GetSurfaceDesc(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc7, (void **)&pGetSurfaceDesc7, "GetSurfaceDesc(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock7 : extLockDir7, (void **)&pLock7, "Lock(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 100), bEmu ? extLock7 : extLockDir7, (void **)&pLock7, "Lock(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock7 : extUnlockDir7, (void **)&pUnlock7, "Unlock(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 128), bEmu ? extUnlock7 : extUnlockDir7, (void **)&pUnlock7, "Unlock(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC7, (void **)&pReleaseDC7, "ReleaseDC(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC7, (void **)&pReleaseDC7, "ReleaseDC(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 120), extSetOverlayPosition7, (void **)&pSetOverlayPosition7, "SetOverlayPosition(S7)");
SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette7, (void **)&pSetPalette7, "SetPalette(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette7, (void **)&pSetPalette7, "SetPalette(S7)");
// added in interface version 3 // added in interface version 3
SetHook((void *)(**(DWORD **)lplpdds + 156), extSetSurfaceDesc7, (void **)&pSetSurfaceDesc7, "SetSurfaceDesc(S7)"); SetHook((void *)(**(DWORD **)lplpdds + 156), extSetSurfaceDesc7, (void **)&pSetSurfaceDesc7, "SetSurfaceDesc(S7)");
@ -4120,7 +4141,7 @@ HRESULT WINAPI extReleaseDC(int dxversion, ReleaseDC_Type pReleaseDC, LPDIRECTDR
IsPrim=dxwss.IsAPrimarySurface(lpdds); IsPrim=dxwss.IsAPrimarySurface(lpdds);
OutTraceDDRAW("ReleaseDC: lpdss=%x%s hdc=%x\n",lpdds, IsPrim?"(PRIM)":"", hdc); OutTraceDDRAW("ReleaseDC: lpdss=%x%s hdc=%x\n",lpdds, IsPrim?"(PRIM)":"", hdc);
res=(*pReleaseDC)(lpdds, hdc); res=(*pReleaseDC)(lpdds, hdc);
if((IsPrim) && (dxw.dwFlags1 & EMULATESURFACE)) {\ if((IsPrim) && (dxw.dwFlags1 & EMULATESURFACE)) {
Blt_Type pBlt; Blt_Type pBlt;
GetGDISurface_Type pGetGDISurface; GetGDISurface_Type pGetGDISurface;
// v2.04.09: for IDirectDraw methods use iBakBufferVersion instead of dxversion ... // v2.04.09: for IDirectDraw methods use iBakBufferVersion instead of dxversion ...
@ -5525,3 +5546,49 @@ HRESULT WINAPI extDuplicateSurface4(LPDIRECTDRAW lpdd, LPDIRECTDRAWSURFACE4 lpdd
{ return extDuplicateSurface(4, (DuplicateSurface_Type)pDuplicateSurface4, lpdd, (LPDIRECTDRAWSURFACE)lpddssrc, (LPDIRECTDRAWSURFACE *)lpddsdest); } { return extDuplicateSurface(4, (DuplicateSurface_Type)pDuplicateSurface4, lpdd, (LPDIRECTDRAWSURFACE)lpddssrc, (LPDIRECTDRAWSURFACE *)lpddsdest); }
HRESULT WINAPI extDuplicateSurface7(LPDIRECTDRAW lpdd, LPDIRECTDRAWSURFACE7 lpddssrc, LPDIRECTDRAWSURFACE7 FAR *lpddsdest) HRESULT WINAPI extDuplicateSurface7(LPDIRECTDRAW lpdd, LPDIRECTDRAWSURFACE7 lpddssrc, LPDIRECTDRAWSURFACE7 FAR *lpddsdest)
{ return extDuplicateSurface(7, (DuplicateSurface_Type)pDuplicateSurface7, lpdd, (LPDIRECTDRAWSURFACE)lpddssrc, (LPDIRECTDRAWSURFACE *)lpddsdest); } { return extDuplicateSurface(7, (DuplicateSurface_Type)pDuplicateSurface7, lpdd, (LPDIRECTDRAWSURFACE)lpddssrc, (LPDIRECTDRAWSURFACE *)lpddsdest); }
static HRESULT WINAPI extSetOverlayPosition(int dxversion, SetOverlayPosition_Type pSetOverlayPosition, LPDIRECTDRAWSURFACE lpdds, LONG lX, LONG lY)
{
HRESULT res;
OutTrace("SetOverlayPosition(%d): lpdds=%x pos=(%ld,%ld)\n", dxversion, lpdds, lX, lY);
res = (*pSetOverlayPosition)(lpdds, lX, lY);
if(res)
OutTraceE("SetOverlayPosition: ERROR res=%x(%s)\n", res, ExplainDDError(res));
return res;
}
HRESULT WINAPI extSetOverlayPosition1(LPDIRECTDRAWSURFACE lpdds, LONG lX, LONG lY)
{ return extSetOverlayPosition(1, pSetOverlayPosition1, lpdds, lX, lY); }
HRESULT WINAPI extSetOverlayPosition2(LPDIRECTDRAWSURFACE lpdds, LONG lX, LONG lY)
{ return extSetOverlayPosition(2, pSetOverlayPosition2, lpdds, lX, lY); }
HRESULT WINAPI extSetOverlayPosition3(LPDIRECTDRAWSURFACE lpdds, LONG lX, LONG lY)
{ return extSetOverlayPosition(3, pSetOverlayPosition3, lpdds, lX, lY); }
HRESULT WINAPI extSetOverlayPosition4(LPDIRECTDRAWSURFACE lpdds, LONG lX, LONG lY)
{ return extSetOverlayPosition(4, pSetOverlayPosition4, lpdds, lX, lY); }
HRESULT WINAPI extSetOverlayPosition7(LPDIRECTDRAWSURFACE lpdds, LONG lX, LONG lY)
{ return extSetOverlayPosition(7, pSetOverlayPosition7, lpdds, lX, lY); }
static HRESULT WINAPI extGetOverlayPosition(int dxversion, GetOverlayPosition_Type pGetOverlayPosition, LPDIRECTDRAWSURFACE lpdds, LPLONG lX, LPLONG lY)
{
HRESULT res;
OutTrace("GetOverlayPosition(%d): lpdds=%x\n", dxversion, lpdds);
res = (*pGetOverlayPosition)(lpdds, lX, lY);
if(res)
OutTraceE("GetOverlayPosition: ERROR res=%x(%s)\n", res, ExplainDDError(res));
else{
OutTraceDW("GetOverlayPosition: pos=(%ld,%ld)\n", *lX, *lY);
}
return res;
}
HRESULT WINAPI extGetOverlayPosition1(LPDIRECTDRAWSURFACE lpdds, LPLONG lX, LPLONG lY)
{ return extGetOverlayPosition(1, pGetOverlayPosition1, lpdds, lX, lY); }
HRESULT WINAPI extGetOverlayPosition2(LPDIRECTDRAWSURFACE lpdds, LPLONG lX, LPLONG lY)
{ return extGetOverlayPosition(2, pGetOverlayPosition2, lpdds, lX, lY); }
HRESULT WINAPI extGetOverlayPosition3(LPDIRECTDRAWSURFACE lpdds, LPLONG lX, LPLONG lY)
{ return extGetOverlayPosition(3, pGetOverlayPosition3, lpdds, lX, lY); }
HRESULT WINAPI extGetOverlayPosition4(LPDIRECTDRAWSURFACE lpdds, LPLONG lX, LPLONG lY)
{ return extGetOverlayPosition(4, pGetOverlayPosition4, lpdds, lX, lY); }
HRESULT WINAPI extGetOverlayPosition7(LPDIRECTDRAWSURFACE lpdds, LPLONG lX, LPLONG lY)
{ return extGetOverlayPosition(7, pGetOverlayPosition7, lpdds, lX, lY); }

View File

@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "TlHelp32.h" #include "TlHelp32.h"
#define VERSION "2.04.17" #define VERSION "2.04.18"
#define DDTHREADLOCK 1 #define DDTHREADLOCK 1
@ -365,7 +365,7 @@ static char *FlagNames[9][32] ={{
"MARKWING32", "DYNAMICZCLEAN", "MARKGDI32", "DUMPDIBSECTION", "MARKWING32", "DYNAMICZCLEAN", "MARKGDI32", "DUMPDIBSECTION",
"DUMPDEVCONTEXT", "QUALITYFONTS", "ALLOWSYSMEMON3DDEV", "CLIPMENU", "DUMPDEVCONTEXT", "QUALITYFONTS", "ALLOWSYSMEMON3DDEV", "CLIPMENU",
"BACKGROUNDPRIORITY", "OFFSCREENZBUFFER", "VIRTUALHEAP", "ZBUFFERHARDCLEAN", "BACKGROUNDPRIORITY", "OFFSCREENZBUFFER", "VIRTUALHEAP", "ZBUFFERHARDCLEAN",
"LOADLIBRARYERR", "SHAREDDCHYBRID", "", "", "LOADLIBRARYERR", "SHAREDDCHYBRID", "FIXADJUSTWINRECT", "HOOKDLGWIN",
},{ },{
// TFlags // TFlags
"OUTTRACE", "OUTDDRAWTRACE", "OUTWINMESSAGES", "OUTCURSORTRACE", "OUTTRACE", "OUTDDRAWTRACE", "OUTWINMESSAGES", "OUTCURSORTRACE",

Binary file not shown.

View File

@ -980,6 +980,7 @@ BOOL WINAPI extGDIBitBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nH
case 1: // memory to screen case 1: // memory to screen
case 3: // screen to screen case 3: // screen to screen
dxw.HandleFPS(); // handle refresh delays dxw.HandleFPS(); // handle refresh delays
sdc.SetOrigin(nXSrc, nYSrc);
sdc.GetPrimaryDC(hdcDest, hdcSrc); sdc.GetPrimaryDC(hdcDest, hdcSrc);
res=(*pGDIBitBlt)(sdc.GetHdc(), nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop); res=(*pGDIBitBlt)(sdc.GetHdc(), nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop);
sdc.PutPrimaryDC(hdcDest, TRUE, nXDest, nYDest, nWidth, nHeight); sdc.PutPrimaryDC(hdcDest, TRUE, nXDest, nYDest, nWidth, nHeight);
@ -987,7 +988,7 @@ BOOL WINAPI extGDIBitBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nH
case 2: // screen to memory case 2: // screen to memory
sdc.GetPrimaryDC(hdcSrc); sdc.GetPrimaryDC(hdcSrc);
res=(*pGDIBitBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, sdc.GetHdc(), nXSrc, nYSrc, dwRop); res=(*pGDIBitBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, sdc.GetHdc(), nXSrc, nYSrc, dwRop);
sdc.PutPrimaryDC(hdcSrc, FALSE); sdc.PutPrimaryDC(hdcSrc, TRUE, nXDest, nYDest, nWidth, nHeight);
break; break;
} }
break; break;
@ -1098,13 +1099,14 @@ BOOL WINAPI extGDIStretchBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, in
case 1: // memory to screen case 1: // memory to screen
case 3: // screen to screen case 3: // screen to screen
sdc.GetPrimaryDC(hdcDest, hdcSrc); sdc.GetPrimaryDC(hdcDest, hdcSrc);
sdc.SetOrigin(nXSrc, nYSrc);
res=(*pGDIStretchBlt)(sdc.GetHdc(), nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, nWSrc, nHSrc, dwRop); res=(*pGDIStretchBlt)(sdc.GetHdc(), nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, nWSrc, nHSrc, dwRop);
sdc.PutPrimaryDC(hdcDest, TRUE, nXDest, nYDest, nWidth, nHeight); sdc.PutPrimaryDC(hdcDest, TRUE, nXDest, nYDest, nWidth, nHeight);
break; break;
case 2: // screen to memory using virtual screen case 2: // screen to memory using virtual screen
sdc.GetPrimaryDC(hdcSrc); sdc.GetPrimaryDC(hdcSrc);
res=(*pGDIStretchBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, sdc.GetHdc(), nXSrc, nYSrc, nWSrc, nHSrc, dwRop); res=(*pGDIStretchBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, sdc.GetHdc(), nXSrc, nYSrc, nWSrc, nHSrc, dwRop);
sdc.PutPrimaryDC(hdcSrc, FALSE, nXSrc, nYSrc, nWSrc, nHSrc); sdc.PutPrimaryDC(hdcSrc, TRUE, nXSrc, nYSrc, nWSrc, nHSrc);
break; break;
} }
break; break;

View File

@ -1685,10 +1685,14 @@ BOOL WINAPI extHeapDestroy(HANDLE hHeap)
#else #else
#define HEAPTRACE FALSE
LPVOID WINAPI extHeapAlloc(HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes) LPVOID WINAPI extHeapAlloc(HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes)
{ {
LPVOID ret; LPVOID ret;
OutTraceB("HeapAlloc: heap=%x flags=%x bytes=%d\n", hHeap, dwFlags, dwBytes); OutTraceB("HeapAlloc: heap=%x flags=%x bytes=%d\n", hHeap, dwFlags, dwBytes);
if(HEAPTRACE) return (*pHeapAlloc)(hHeap, dwFlags, dwBytes);
ret = malloc(dwBytes); ret = malloc(dwBytes);
if(ret){ if(ret){
if(ret > VHeapMax) VHeapMax = ret; if(ret > VHeapMax) VHeapMax = ret;
@ -1702,6 +1706,8 @@ LPVOID WINAPI extHeapReAlloc(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem, SIZE_T d
{ {
LPVOID ret; LPVOID ret;
OutTraceB("HeapReAlloc: heap=%x flags=%x mem=%x bytes=%d\n", hHeap, dwFlags, lpMem, dwBytes); OutTraceB("HeapReAlloc: heap=%x flags=%x mem=%x bytes=%d\n", hHeap, dwFlags, lpMem, dwBytes);
if(HEAPTRACE) return (*pHeapReAlloc)(hHeap, dwFlags, lpMem, dwBytes);
ret = realloc(lpMem, dwBytes); ret = realloc(lpMem, dwBytes);
if(ret){ if(ret){
if(ret > VHeapMax) VHeapMax = ret; if(ret > VHeapMax) VHeapMax = ret;
@ -1715,6 +1721,8 @@ BOOL WINAPI extHeapFree(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem)
{ {
BOOL ret; BOOL ret;
OutTraceB("HeapFree: heap=%x flags=%x mem=%x\n", hHeap, dwFlags, lpMem); OutTraceB("HeapFree: heap=%x flags=%x mem=%x\n", hHeap, dwFlags, lpMem);
if(HEAPTRACE) return (*pHeapFree)(hHeap, dwFlags, lpMem);
if((lpMem >= VHeapMin) && (lpMem <= VHeapMax)){ if((lpMem >= VHeapMin) && (lpMem <= VHeapMax)){
free(lpMem); free(lpMem);
ret = TRUE; ret = TRUE;
@ -1731,6 +1739,8 @@ BOOL WINAPI extHeapValidate(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem)
{ {
BOOL ret; BOOL ret;
OutTraceB("HeapValidate: heap=%x flags=%x mem=%x\n", hHeap, dwFlags, lpMem); OutTraceB("HeapValidate: heap=%x flags=%x mem=%x\n", hHeap, dwFlags, lpMem);
if(HEAPTRACE) return (*pHeapValidate)(hHeap, dwFlags, lpMem);
if((lpMem >= VHeapMin) && (lpMem <= VHeapMax)){ if((lpMem >= VHeapMin) && (lpMem <= VHeapMax)){
ret = TRUE; ret = TRUE;
OutTraceB("HeapValidate: (virtual) ret=%x\n", ret); OutTraceB("HeapValidate: (virtual) ret=%x\n", ret);
@ -1746,6 +1756,8 @@ SIZE_T WINAPI extHeapCompact(HANDLE hHeap, DWORD dwFlags)
{ {
SIZE_T ret; SIZE_T ret;
OutTraceB("HeapCompact: heap=%x flags=%x\n", hHeap, dwFlags); OutTraceB("HeapCompact: heap=%x flags=%x\n", hHeap, dwFlags);
if(HEAPTRACE) return (*pHeapCompact)(hHeap, dwFlags);
if(((DWORD)hHeap >= 0xDEADBEEF) && ((DWORD)hHeap < 0xDEADBEEF + iProg)){ if(((DWORD)hHeap >= 0xDEADBEEF) && ((DWORD)hHeap < 0xDEADBEEF + iProg)){
ret = 100000; // just a number .... ret = 100000; // just a number ....
OutTraceB("HeapCompact: (virtual) ret=%d\n", ret); OutTraceB("HeapCompact: (virtual) ret=%d\n", ret);
@ -1761,6 +1773,8 @@ HANDLE WINAPI extHeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaxi
{ {
HANDLE ret; HANDLE ret;
OutTraceB("HeapCreate: flags=%x size(init-max)=(%d-%d)\n", flOptions, dwInitialSize, dwMaximumSize); OutTraceB("HeapCreate: flags=%x size(init-max)=(%d-%d)\n", flOptions, dwInitialSize, dwMaximumSize);
if(HEAPTRACE) return (*pHeapCreate)(flOptions, dwInitialSize, dwMaximumSize);
ret = (HANDLE)(0xDEADBEEF + iProg++); ret = (HANDLE)(0xDEADBEEF + iProg++);
OutTraceB("HeapCreate: (virtual) ret=%X\n", ret); OutTraceB("HeapCreate: (virtual) ret=%X\n", ret);
return ret; return ret;
@ -1769,6 +1783,8 @@ HANDLE WINAPI extHeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaxi
HANDLE WINAPI extGetProcessHeap(void) HANDLE WINAPI extGetProcessHeap(void)
{ {
OutTraceB("GetProcessHeap: (virtual) ret=0xDEADBEEF\n"); OutTraceB("GetProcessHeap: (virtual) ret=0xDEADBEEF\n");
if(HEAPTRACE) return (*pGetProcessHeap)();
return (HANDLE)0xDEADBEEF; return (HANDLE)0xDEADBEEF;
} }
@ -1776,6 +1792,8 @@ BOOL WINAPI extHeapDestroy(HANDLE hHeap)
{ {
BOOL ret; BOOL ret;
OutTraceB("HeapDestroy: heap=%x\n", hHeap); OutTraceB("HeapDestroy: heap=%x\n", hHeap);
if(HEAPTRACE) return (*pHeapDestroy)(hHeap);
if(((DWORD)hHeap >= 0xDEADBEEF) && ((DWORD)hHeap < 0xDEADBEEF + iProg)) if(((DWORD)hHeap >= 0xDEADBEEF) && ((DWORD)hHeap < 0xDEADBEEF + iProg))
ret = TRUE; ret = TRUE;
else else

View File

@ -205,6 +205,12 @@ HDC dxwSDC::GetPrimaryDC(HDC hdc, HDC hdcsrc)
return VirtualHDC; return VirtualHDC;
} }
void dxwSDC::SetOrigin(int x, int y)
{
HybridX = x;
HybridY = y;
}
/*---------------------------------------------------------------------------------+ /*---------------------------------------------------------------------------------+
| | | |
| GetHdc: returns the DC to write for the GDI call | | GetHdc: returns the DC to write for the GDI call |
@ -273,10 +279,10 @@ BOOL dxwSDC::PutPrimaryDC(HDC hdc, BOOL UpdateScreen, int XDest, int YDest, int
dxw.MapClient(&nXDest, &nYDest, &nWDest, &nHDest); dxw.MapClient(&nXDest, &nYDest, &nWDest, &nHDest);
res=(*pGDIStretchBlt)( res=(*pGDIStretchBlt)(
CurrentHDC, nXDest, nYDest, nWDest, nHDest, CurrentHDC, nXDest, nYDest, nWDest, nHDest,
CurrentHDCSrc, XDest, YDest, nDestWidth, nDestHeight, SRCCOPY); CurrentHDCSrc, HybridX, HybridY, nDestWidth, nDestHeight, SRCCOPY);
if(!res) OutTraceE("dxwSDC::PutPrimaryDC: StretchBlt ERROR err=%d\n", GetLastError()); if(!res) OutTraceE("dxwSDC::PutPrimaryDC: StretchBlt ERROR err=%d\n", GetLastError());
//res=(*pGDIReleaseDC)(WindowFromDC(CurrentHDC), CurrentHDC); //RECT rect = {nXDest, nYDest, nXDest+nWDest, nYDest+nHDest};
//if(!res) OutTraceE("dxwSDC::PutPrimaryDC: ReleaseDC ERROR err=%d\n", GetLastError()); //res = (*pFrameRect)(CurrentHDC, &rect, 0);
} }
break; break;

View File

@ -24,6 +24,7 @@ public: // methods
HDC GetHdc(void); HDC GetHdc(void);
BOOL PutPrimaryDC(HDC, BOOL, int, int, int, int); BOOL PutPrimaryDC(HDC, BOOL, int, int, int, int);
BOOL PutPrimaryDC(HDC, BOOL); BOOL PutPrimaryDC(HDC, BOOL);
void SetOrigin(int, int);
private: private:
void copyDcAttributes(HDC, HDC, POINT); void copyDcAttributes(HDC, HDC, POINT);
@ -51,6 +52,8 @@ private:
POINT origin; POINT origin;
HWND rootWnd; HWND rootWnd;
}; };
int HybridX;
int HybridY;
}; };

View File

@ -88,7 +88,6 @@ static HookEntryEx_Type Hooks[]={
#ifdef GALAPAGOSTEST #ifdef GALAPAGOSTEST
// test for Galapagos // test for Galapagos
{HOOK_HOT_CANDIDATE, 0, "GetForegroundWindow", (FARPROC)GetForegroundWindow, (FARPROC *)&pGetForegroundWindow, (FARPROC)extGetForegroundWindow},
{HOOK_HOT_CANDIDATE, 0, "GetFocus", (FARPROC)GetFocus, (FARPROC *)&pGetFocus, (FARPROC)extGetFocus}, {HOOK_HOT_CANDIDATE, 0, "GetFocus", (FARPROC)GetFocus, (FARPROC *)&pGetFocus, (FARPROC)extGetFocus},
{HOOK_HOT_CANDIDATE, 0, "SetFocus", (FARPROC)SetFocus, (FARPROC *)&pSetFocus, (FARPROC)extSetFocus}, {HOOK_HOT_CANDIDATE, 0, "SetFocus", (FARPROC)SetFocus, (FARPROC *)&pSetFocus, (FARPROC)extSetFocus},
{HOOK_HOT_CANDIDATE, 0, "IsWindow", (FARPROC)IsWindow, (FARPROC *)&pIsWindow, (FARPROC)extIsWindow}, {HOOK_HOT_CANDIDATE, 0, "IsWindow", (FARPROC)IsWindow, (FARPROC *)&pIsWindow, (FARPROC)extIsWindow},
@ -143,6 +142,7 @@ static HookEntryEx_Type Hooks[]={
{HOOK_IAT_CANDIDATE, 0, "AdjustWindowRect", (FARPROC)NULL, (FARPROC *)&pAdjustWindowRect, (FARPROC)extAdjustWindowRect}, {HOOK_IAT_CANDIDATE, 0, "AdjustWindowRect", (FARPROC)NULL, (FARPROC *)&pAdjustWindowRect, (FARPROC)extAdjustWindowRect},
{HOOK_IAT_CANDIDATE, 0, "AdjustWindowRectEx", (FARPROC)AdjustWindowRectEx, (FARPROC *)&pAdjustWindowRectEx, (FARPROC)extAdjustWindowRectEx}, {HOOK_IAT_CANDIDATE, 0, "AdjustWindowRectEx", (FARPROC)AdjustWindowRectEx, (FARPROC *)&pAdjustWindowRectEx, (FARPROC)extAdjustWindowRectEx},
{HOOK_HOT_CANDIDATE, 0, "GetActiveWindow", (FARPROC)NULL, (FARPROC *)&pGetActiveWindow, (FARPROC)extGetActiveWindow}, {HOOK_HOT_CANDIDATE, 0, "GetActiveWindow", (FARPROC)NULL, (FARPROC *)&pGetActiveWindow, (FARPROC)extGetActiveWindow},
{HOOK_HOT_CANDIDATE, 0, "GetForegroundWindow", (FARPROC)GetForegroundWindow, (FARPROC *)&pGetForegroundWindow, (FARPROC)extGetForegroundWindow},
{HOOK_IAT_CANDIDATE, 0, 0, NULL, 0, 0} // terminator {HOOK_IAT_CANDIDATE, 0, 0, NULL, 0, 0} // terminator
}; };
@ -163,7 +163,7 @@ static HookEntryEx_Type RemapHooks[]={
static HookEntryEx_Type SyscallHooks[]={ static HookEntryEx_Type SyscallHooks[]={
{HOOK_IAT_CANDIDATE, 0, "FrameRect", (FARPROC)FrameRect, (FARPROC *)&pFrameRect, (FARPROC)extFrameRect}, {HOOK_IAT_CANDIDATE, 0, "FrameRect", (FARPROC)FrameRect, (FARPROC *)&pFrameRect, (FARPROC)extFrameRect},
// commented ot, dangerous: see comments // commented ot, dangerous: see comments
//{HOOK_IAT_CANDIDATE, 0, "GetParent", (FARPROC)GetParent, (FARPROC *)&pGetParent, (FARPROC)extGetParent}, {HOOK_IAT_CANDIDATE, 0, "GetParent", (FARPROC)GetParent, (FARPROC *)&pGetParent, (FARPROC)extGetParent},
{HOOK_HOT_CANDIDATE, 0, "InvalidateRgn", (FARPROC)InvalidateRgn, (FARPROC *)&pInvalidateRgn, (FARPROC)extInvalidateRgn}, {HOOK_HOT_CANDIDATE, 0, "InvalidateRgn", (FARPROC)InvalidateRgn, (FARPROC *)&pInvalidateRgn, (FARPROC)extInvalidateRgn},
{HOOK_IAT_CANDIDATE, 0, "TabbedTextOutA", (FARPROC)TabbedTextOutA, (FARPROC *)&pTabbedTextOutA, (FARPROC)extTabbedTextOutA}, {HOOK_IAT_CANDIDATE, 0, "TabbedTextOutA", (FARPROC)TabbedTextOutA, (FARPROC *)&pTabbedTextOutA, (FARPROC)extTabbedTextOutA},
{HOOK_IAT_CANDIDATE, 0, "TabbedTextOutW", (FARPROC)TabbedTextOutW, (FARPROC *)&pTabbedTextOutW, (FARPROC)extTabbedTextOutW}, {HOOK_IAT_CANDIDATE, 0, "TabbedTextOutW", (FARPROC)TabbedTextOutW, (FARPROC *)&pTabbedTextOutW, (FARPROC)extTabbedTextOutW},
@ -843,7 +843,7 @@ LONG WINAPI extSetWindowLong(HWND hwnd, int nIndex, LONG dwNewLong, SetWindowLon
} }
// hook extDlgWindowProc to dialog win .... // hook extDlgWindowProc to dialog win ....
if((WinStyle & DWL_DLGPROC) && (dxw.dwFlags1 & HOOKCHILDWIN)){ if((WinStyle & DWL_DLGPROC) && (dxw.dwFlags8 & HOOKDLGWIN)){
if(OldProc==extDialogWindowProc) OldProc=dxwws.GetProc(hwnd); if(OldProc==extDialogWindowProc) OldProc=dxwws.GetProc(hwnd);
dxwws.PutProc(hwnd, (WNDPROC)dwNewLong); dxwws.PutProc(hwnd, (WNDPROC)dwNewLong);
res=(LONG)OldProc; res=(LONG)OldProc;
@ -2541,15 +2541,13 @@ HWND WINAPI extCreateDialogIndirectParam(HINSTANCE hInstance, LPCDLGTEMPLATE lpT
hInstance, hInstance,
lpTemplate->style, lpTemplate->dwExtendedStyle, lpTemplate->cdit, lpTemplate->x, lpTemplate->y, lpTemplate->cx, lpTemplate->cy, lpTemplate->style, lpTemplate->dwExtendedStyle, lpTemplate->cdit, lpTemplate->x, lpTemplate->y, lpTemplate->cx, lpTemplate->cy,
hWndParent, lpDialogFunc, lParamInit); hWndParent, lpDialogFunc, lParamInit);
if(dxw.IsFullScreen() && hWndParent==NULL) hWndParent=dxw.GethWnd();
// v2.03.98: commented out the temporary return to windowed mode to make Red Alert 2 dialog work again! if(dxw.IsFullScreen() && dxw.IsRealDesktop(hWndParent)) hWndParent=dxw.GethWnd();
//InMainWinCreation++;
RetHWND=(*pCreateDialogIndirectParam)(hInstance, lpTemplate, hWndParent, lpDialogFunc, lParamInit); RetHWND=(*pCreateDialogIndirectParam)(hInstance, lpTemplate, hWndParent, lpDialogFunc, lParamInit);
//InMainWinCreation--;
// v2.02.73: redirect lpDialogFunc only when it is nor NULL // v2.02.73: redirect lpDialogFunc only when it is nor NULL: fix for "LEGO Stunt Rally"
if( lpDialogFunc && if(lpDialogFunc && (dxw.dwFlags8 & HOOKDLGWIN)){ // v2.03.41 - debug option
!(dxw.dwFlags6 & NOWINDOWHOOKS)){ // v2.03.41 - debug option
dxwws.PutProc(RetHWND, (WNDPROC)lpDialogFunc); dxwws.PutProc(RetHWND, (WNDPROC)lpDialogFunc);
if(!(*pSetWindowLong)(RetHWND, DWL_DLGPROC, (LONG)extDialogWindowProc)) if(!(*pSetWindowLong)(RetHWND, DWL_DLGPROC, (LONG)extDialogWindowProc))
OutTraceE("SetWindowLong: ERROR err=%d at %d\n", GetLastError(), __LINE__); OutTraceE("SetWindowLong: ERROR err=%d at %d\n", GetLastError(), __LINE__);
@ -2564,14 +2562,14 @@ HWND WINAPI extCreateDialogParam(HINSTANCE hInstance, LPCTSTR lpTemplateName, HW
HWND RetHWND; HWND RetHWND;
OutTraceDW("CreateDialogParam: hInstance=%x lpTemplateName=%s hWndParent=%x lpDialogFunc=%x lParamInit=%x\n", OutTraceDW("CreateDialogParam: hInstance=%x lpTemplateName=%s hWndParent=%x lpDialogFunc=%x lParamInit=%x\n",
hInstance, sTemplateName(lpTemplateName), hWndParent, lpDialogFunc, lParamInit); hInstance, sTemplateName(lpTemplateName), hWndParent, lpDialogFunc, lParamInit);
if(hWndParent==NULL) hWndParent=dxw.GethWnd();
//InMainWinCreation++; if(dxw.IsFullScreen() && dxw.IsRealDesktop(hWndParent)) hWndParent=dxw.GethWnd();
RetHWND=(*pCreateDialogParam)(hInstance, lpTemplateName, hWndParent, lpDialogFunc, lParamInit); RetHWND=(*pCreateDialogParam)(hInstance, lpTemplateName, hWndParent, lpDialogFunc, lParamInit);
//InMainWinCreation--;
// v2.02.73: redirect lpDialogFunc only when it is nor NULL: fix for "LEGO Stunt Rally" // v2.02.73: redirect lpDialogFunc only when it is nor NULL: fix for "LEGO Stunt Rally"
if( lpDialogFunc && // v2.04.18: HOOKDLGWIN (not to be checked to fix "PBA Bowling 2")
!(dxw.dwFlags6 & NOWINDOWHOOKS)){ // v2.03.41 - debug option if(lpDialogFunc && (dxw.dwFlags8 & HOOKDLGWIN)){ // v2.03.41 - debug option
dxwws.PutProc(RetHWND, (WNDPROC)lpDialogFunc); dxwws.PutProc(RetHWND, (WNDPROC)lpDialogFunc);
if(!(*pSetWindowLong)(RetHWND, DWL_DLGPROC, (LONG)extDialogWindowProc)) if(!(*pSetWindowLong)(RetHWND, DWL_DLGPROC, (LONG)extDialogWindowProc))
OutTraceE("SetWindowLong: ERROR err=%d at %d\n", GetLastError(), __LINE__); OutTraceE("SetWindowLong: ERROR err=%d at %d\n", GetLastError(), __LINE__);
@ -3179,14 +3177,18 @@ BOOL WINAPI extGetWindowPlacement(HWND hwnd, WINDOWPLACEMENT *lpwndpl)
lpwndpl->ptMaxPosition.x, lpwndpl->ptMaxPosition.y, lpwndpl->ptMaxPosition.x, lpwndpl->ptMaxPosition.y,
lpwndpl->rcNormalPosition.left, lpwndpl->rcNormalPosition.top, lpwndpl->rcNormalPosition.right, lpwndpl->rcNormalPosition.bottom); lpwndpl->rcNormalPosition.left, lpwndpl->rcNormalPosition.top, lpwndpl->rcNormalPosition.right, lpwndpl->rcNormalPosition.bottom);
switch (lpwndpl->showCmd){ if (ret && dxw.Windowize && dxw.IsFullScreen()){
case SW_SHOW: lpwndpl->showCmd = SW_SHOWNORMAL;
if (dxw.IsFullScreen()){ lpwndpl->ptMinPosition.x = -1; lpwndpl->ptMinPosition.y = -1;
lpwndpl->showCmd = SW_MAXIMIZE; lpwndpl->ptMaxPosition.x = -1; lpwndpl->ptMaxPosition.y = -1;
OutTraceDW("GetWindowPlacement: forcing SW_MAXIMIZE state\n"); OutTrace("GetWindowPlacement: FIXED showCmd=%x MinPosition=(%d,%d) MaxPosition=(%d,%d) NormalPosition=(%d,%d)-(%d,%d)\n",
} lpwndpl->showCmd,
break; lpwndpl->ptMinPosition.x, lpwndpl->ptMinPosition.y,
lpwndpl->ptMaxPosition.x, lpwndpl->ptMaxPosition.y,
lpwndpl->rcNormalPosition.left, lpwndpl->rcNormalPosition.top,
lpwndpl->rcNormalPosition.right, lpwndpl->rcNormalPosition.bottom);
} }
if(!ret) OutTraceE("GetWindowPlacement: ERROR er=%d\n", GetLastError()); if(!ret) OutTraceE("GetWindowPlacement: ERROR er=%d\n", GetLastError());
return ret; return ret;
} }
@ -3245,7 +3247,7 @@ HWND WINAPI extGetForegroundWindow(void)
{ {
HWND ret; HWND ret;
ret=(*pGetForegroundWindow)(); ret=(*pGetForegroundWindow)();
if(dxw.Windowize && dxw.IsFullScreen()) { if((dxw.dwFlags8 & WININSULATION) && dxw.Windowize && dxw.IsFullScreen()) {
OutTraceDW("GetForegroundWindow: ret=%x->%x\n", ret, dxw.GethWnd()); OutTraceDW("GetForegroundWindow: ret=%x->%x\n", ret, dxw.GethWnd());
return dxw.GethWnd(); return dxw.GethWnd();
} }
@ -3454,6 +3456,7 @@ BOOL extGetMonitorInfo(HMONITOR hMonitor, LPMONITORINFO lpmi, GetMonitorInfo_Typ
BOOL res; BOOL res;
OutTraceDW("GetMonitorInfo: hMonitor=%x mi=MONITORINFO%s\n", hMonitor, lpmi->cbSize==sizeof(MONITORINFO)?"":"EX"); OutTraceDW("GetMonitorInfo: hMonitor=%x mi=MONITORINFO%s\n", hMonitor, lpmi->cbSize==sizeof(MONITORINFO)?"":"EX");
res=(*pGetMonitorInfo)(hMonitor, lpmi); res=(*pGetMonitorInfo)(hMonitor, lpmi);
//v2.03.15 - must fix the coordinates also in case of error: that may depend on the windowed mode. //v2.03.15 - must fix the coordinates also in case of error: that may depend on the windowed mode.
if(dxw.Windowize){ if(dxw.Windowize){
OutTraceDW("GetMonitorInfo: FIX Work=(%d,%d)-(%d,%d) Monitor=(%d,%d)-(%d,%d) -> (%d,%d)-(%d,%d)\n", OutTraceDW("GetMonitorInfo: FIX Work=(%d,%d)-(%d,%d) Monitor=(%d,%d)-(%d,%d) -> (%d,%d)-(%d,%d)\n",
@ -3462,10 +3465,17 @@ BOOL extGetMonitorInfo(HMONITOR hMonitor, LPMONITORINFO lpmi, GetMonitorInfo_Typ
0, 0, dxw.GetScreenWidth(), dxw.GetScreenHeight()); 0, 0, dxw.GetScreenWidth(), dxw.GetScreenHeight());
lpmi->rcWork = dxw.GetScreenRect(); lpmi->rcWork = dxw.GetScreenRect();
lpmi->rcMonitor = dxw.GetScreenRect(); lpmi->rcMonitor = dxw.GetScreenRect();
res=TRUE; return TRUE;
} }
else
if(res) {
OutTraceDW("GetMonitorInfo: Work=(%d,%d)-(%d,%d) Monitor=(%d,%d)-(%d,%d)\n",
lpmi->rcWork.left, lpmi->rcWork.top, lpmi->rcWork.right, lpmi->rcWork.bottom,
lpmi->rcMonitor.left, lpmi->rcMonitor.top, lpmi->rcMonitor.right, lpmi->rcMonitor.bottom);
}
else {
OutTraceE("GetMonitorInfo: ERROR err=%d\n", GetLastError()); OutTraceE("GetMonitorInfo: ERROR err=%d\n", GetLastError());
}
return res; return res;
} }
@ -3857,6 +3867,12 @@ HWND WINAPI extGetParent(HWND hWnd)
return ret; return ret;
} }
#else
// just proxy, but the pGetParent pointer must stay initialized
// P.s.so far, GetParent wrapping is useless, could be eliminated, but
// replacing *pGetParent with unhooked GetParent invokations.
HWND WINAPI extGetParent(HWND hWnd)
{ return (*pGetParent)(hWnd); }
#endif #endif
BOOL WINAPI extInvalidateRgn(HWND hWnd, HRGN hRgn, BOOL bErase) BOOL WINAPI extInvalidateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
@ -4154,8 +4170,7 @@ BOOL WINAPI extAdjustWindowRect(LPRECT lpRect, DWORD dwStyle, BOOL bMenu)
lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom,
dwStyle, ExplainStyle(dwStyle), bMenu); dwStyle, ExplainStyle(dwStyle), bMenu);
//if(dxw.dwFlags2 & FORCEWINRESIZE) if(dxw.Windowize && (dxw.dwFlags8 & FIXADJUSTWINRECT)) RedirectCoordinates(lpRect);
if(dxw.Windowize) RedirectCoordinates(lpRect);
ret = pAdjustWindowRect(lpRect, dwStyle, bMenu); ret = pAdjustWindowRect(lpRect, dwStyle, bMenu);
@ -4176,8 +4191,7 @@ BOOL WINAPI extAdjustWindowRectEx(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWOR
lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom,
dwStyle, ExplainStyle(dwStyle), bMenu, dwExStyle, ExplainExStyle(dwExStyle)); dwStyle, ExplainStyle(dwStyle), bMenu, dwExStyle, ExplainExStyle(dwExStyle));
//if(dxw.dwFlags2 & FORCEWINRESIZE) if(dxw.Windowize && (dxw.dwFlags8 & FIXADJUSTWINRECT)) RedirectCoordinates(lpRect);
if(dxw.Windowize) RedirectCoordinates(lpRect);
ret = pAdjustWindowRectEx(lpRect, dwStyle, bMenu, dwExStyle); ret = pAdjustWindowRectEx(lpRect, dwStyle, bMenu, dwExStyle);

View File

@ -19,6 +19,9 @@
BOOL IsWithinMCICall = FALSE; BOOL IsWithinMCICall = FALSE;
typedef MMRESULT (WINAPI *timeGetDevCaps_Type)(LPTIMECAPS, UINT);
timeGetDevCaps_Type ptimeGetDevCaps = NULL;
MMRESULT WINAPI exttimeGetDevCaps(LPTIMECAPS, UINT);
typedef MCIDEVICEID (WINAPI *mciGetDeviceIDA_Type)(LPCTSTR); typedef MCIDEVICEID (WINAPI *mciGetDeviceIDA_Type)(LPCTSTR);
mciGetDeviceIDA_Type pmciGetDeviceIDA = NULL; mciGetDeviceIDA_Type pmciGetDeviceIDA = NULL;
MCIDEVICEID WINAPI extmciGetDeviceIDA(LPCTSTR); MCIDEVICEID WINAPI extmciGetDeviceIDA(LPCTSTR);
@ -52,6 +55,13 @@ UINT WINAPI extwaveOutGetNumDevs(void);
typedef UINT (WINAPI *mixerGetNumDevs_Type)(void); typedef UINT (WINAPI *mixerGetNumDevs_Type)(void);
mixerGetNumDevs_Type pmixerGetNumDevs; mixerGetNumDevs_Type pmixerGetNumDevs;
UINT WINAPI extmixerGetNumDevs(void); UINT WINAPI extmixerGetNumDevs(void);
typedef UINT (WINAPI *timeBeginPeriod_Type)(UINT);
timeBeginPeriod_Type ptimeBeginPeriod;
UINT WINAPI exttimeBeginPeriod(UINT);
typedef UINT (WINAPI *timeEndPeriod_Type)(UINT);
timeEndPeriod_Type ptimeEndPeriod;
UINT WINAPI exttimeEndPeriod(UINT);
static HookEntryEx_Type Hooks[]={ static HookEntryEx_Type Hooks[]={
{HOOK_IAT_CANDIDATE, 0, "mciSendCommandA", NULL, (FARPROC *)&pmciSendCommandA, (FARPROC)extmciSendCommandA}, {HOOK_IAT_CANDIDATE, 0, "mciSendCommandA", NULL, (FARPROC *)&pmciSendCommandA, (FARPROC)extmciSendCommandA},
@ -66,6 +76,9 @@ static HookEntryEx_Type TimeHooks[]={
{HOOK_HOT_CANDIDATE, 0, "timeGetTime", NULL, (FARPROC *)&ptimeGetTime, (FARPROC)exttimeGetTime}, {HOOK_HOT_CANDIDATE, 0, "timeGetTime", NULL, (FARPROC *)&ptimeGetTime, (FARPROC)exttimeGetTime},
{HOOK_HOT_CANDIDATE, 0, "timeKillEvent", NULL, (FARPROC *)&ptimeKillEvent, (FARPROC)exttimeKillEvent}, {HOOK_HOT_CANDIDATE, 0, "timeKillEvent", NULL, (FARPROC *)&ptimeKillEvent, (FARPROC)exttimeKillEvent},
{HOOK_HOT_CANDIDATE, 0, "timeSetEvent", NULL, (FARPROC *)&ptimeSetEvent, (FARPROC)exttimeSetEvent}, {HOOK_HOT_CANDIDATE, 0, "timeSetEvent", NULL, (FARPROC *)&ptimeSetEvent, (FARPROC)exttimeSetEvent},
{HOOK_HOT_CANDIDATE, 0, "timeGetDevCaps", NULL, (FARPROC *)&ptimeGetDevCaps, (FARPROC)exttimeGetDevCaps},
{HOOK_HOT_CANDIDATE, 0, "timeBeginPeriod", NULL, (FARPROC *)&ptimeBeginPeriod, (FARPROC)exttimeBeginPeriod},
{HOOK_HOT_CANDIDATE, 0, "timeEndPeriod", NULL, (FARPROC *)&ptimeEndPeriod, (FARPROC)exttimeEndPeriod},
{HOOK_IAT_CANDIDATE, 0, 0, NULL, 0, 0} // terminator {HOOK_IAT_CANDIDATE, 0, 0, NULL, 0, 0} // terminator
}; };
@ -118,6 +131,19 @@ FARPROC Remap_WinMM_ProcAddress(LPCSTR proc, HMODULE hModule)
return NULL; return NULL;
} }
MMRESULT WINAPI exttimeGetDevCaps(LPTIMECAPS ptc, UINT cbtc)
{
MMRESULT res;
res = (*ptimeGetDevCaps)(ptc, cbtc);
if(res) {
OutTraceE("timeGetDevCaps ERROR: res=%x err=%d\n", res, GetLastError());
}
else {
OutTraceDW("timeGetDevCaps: period min=%d max=%d\n", ptc->wPeriodMin, ptc->wPeriodMax);
}
return MMSYSERR_NOERROR;
}
DWORD WINAPI exttimeGetTime(void) DWORD WINAPI exttimeGetTime(void)
{ {
DWORD ret; DWORD ret;
@ -149,6 +175,24 @@ MMRESULT WINAPI exttimeKillEvent(UINT uTimerID)
return res; return res;
} }
MMRESULT WINAPI exttimeBeginPeriod(UINT uPeriod)
{
MMRESULT res;
OutTraceDW("timeBeginPeriod: period=%d\n", uPeriod);
res=(*ptimeBeginPeriod)(uPeriod);
OutTraceDW("timeBeginPeriod: ret=%x\n", res);
return res;
}
MMRESULT WINAPI exttimeEndPeriod(UINT uPeriod)
{
MMRESULT res;
OutTraceDW("timeEndPeriod: period=%d\n", uPeriod);
res=(*ptimeEndPeriod)(uPeriod);
OutTraceDW("timeEndPeriod: ret=%x\n", res);
return res;
}
/* MCI_DGV_PUT_FRAME /* MCI_DGV_PUT_FRAME
The rectangle defined for MCI_DGV_RECT applies to the frame rectangle. The rectangle defined for MCI_DGV_RECT applies to the frame rectangle.
@ -199,6 +243,26 @@ static char *sDeviceType(DWORD dt)
return s; return s;
} }
static char *sTimeFormat(DWORD tf)
{
char *s;
switch(tf){
case MCI_FORMAT_MILLISECONDS: s="MILLISECONDS"; break;
case MCI_FORMAT_HMS: s="HMS"; break;
case MCI_FORMAT_MSF: s="MSF"; break;
case MCI_FORMAT_FRAMES: s="FRAMES"; break;
case MCI_FORMAT_SMPTE_24: s="SMPTE_24"; break;
case MCI_FORMAT_SMPTE_25: s="SMPTE_25"; break;
case MCI_FORMAT_SMPTE_30: s="SMPTE_30"; break;
case MCI_FORMAT_SMPTE_30DROP: s="SMPTE_30DROP"; break;
case MCI_FORMAT_BYTES: s="BYTES"; break;
case MCI_FORMAT_SAMPLES: s="SAMPLES"; break;
case MCI_FORMAT_TMSF: s="TMSF"; break;
default: s="unknown"; break;
}
return s;
}
static void DumpMciMessage(char *label, BOOL isAnsi, UINT uMsg, DWORD_PTR fdwCommand, DWORD_PTR dwParam) static void DumpMciMessage(char *label, BOOL isAnsi, UINT uMsg, DWORD_PTR fdwCommand, DWORD_PTR dwParam)
{ {
char *api="mciSendCommand"; char *api="mciSendCommand";
@ -271,6 +335,13 @@ static void DumpMciMessage(char *label, BOOL isAnsi, UINT uMsg, DWORD_PTR fdwCom
api, label, lpSysInfo->dwCallback, lpSysInfo->dwRetSize, lpSysInfo->dwNumber, lpSysInfo->wDeviceType, sDeviceType(lpSysInfo->wDeviceType)); api, label, lpSysInfo->dwCallback, lpSysInfo->dwRetSize, lpSysInfo->dwNumber, lpSysInfo->wDeviceType, sDeviceType(lpSysInfo->wDeviceType));
} }
break; break;
case MCI_SET:
{
LPMCI_SET_PARMS lpSetInfo = (LPMCI_SET_PARMS)dwParam;
OutTrace("%s%s: MCI_SET cb=%x audio=%x timeformat=%x(%s)\n",
api, label, lpSetInfo->dwCallback, lpSetInfo->dwAudio, lpSetInfo->dwTimeFormat, sTimeFormat(lpSetInfo->dwTimeFormat));
}
break;
default: default:
{ {
LPMCI_GENERIC_PARMS lpGeneric = (LPMCI_GENERIC_PARMS)dwParam; LPMCI_GENERIC_PARMS lpGeneric = (LPMCI_GENERIC_PARMS)dwParam;
@ -287,9 +358,9 @@ MCIERROR WINAPI extmciSendCommand(BOOL isAnsi, mciSendCommand_Type pmciSendComma
{ {
RECT saverect; RECT saverect;
MCIERROR ret; MCIERROR ret;
MCI_ANIM_RECT_PARMS *pr; LPMCI_ANIM_RECT_PARMS pr;
MCI_OVLY_WINDOW_PARMSA *pw; LPMCI_OVLY_WINDOW_PARMSA pw;
MCI_OPEN_PARMSA *po; LPMCI_OPEN_PARMSA po;
OutTraceDW("mciSendCommand%c: IDDevice=%x msg=%x(%s) Command=%x(%s)\n", OutTraceDW("mciSendCommand%c: IDDevice=%x msg=%x(%s) Command=%x(%s)\n",
isAnsi ? 'A' : 'W', isAnsi ? 'A' : 'W',
@ -302,11 +373,11 @@ MCIERROR WINAPI extmciSendCommand(BOOL isAnsi, mciSendCommand_Type pmciSendComma
if(dxw.dwFlags6 & BYPASSMCI){ if(dxw.dwFlags6 & BYPASSMCI){
//MCI_OPEN_PARMS *op; //MCI_OPEN_PARMS *op;
MCI_STATUS_PARMS *sp; MCI_STATUS_PARMS *sp;
ret = 0;
switch(uMsg){ switch(uMsg){
case MCI_OPEN: case MCI_OPEN:
po = (MCI_OPEN_PARMSA *)dwParam; po = (MCI_OPEN_PARMSA *)dwParam;
po->wDeviceID = 1; po->wDeviceID = 1;
ret = 0;
break; break;
case MCI_STATUS: case MCI_STATUS:
if(fdwCommand & MCI_STATUS_ITEM){ if(fdwCommand & MCI_STATUS_ITEM){
@ -330,10 +401,8 @@ MCIERROR WINAPI extmciSendCommand(BOOL isAnsi, mciSendCommand_Type pmciSendComma
break; break;
} }
} }
ret = 0;
break; break;
default: default:
ret = 0;
break; break;
} }
if(IsDebug) DumpMciMessage("<<", isAnsi, uMsg, fdwCommand, dwParam); if(IsDebug) DumpMciMessage("<<", isAnsi, uMsg, fdwCommand, dwParam);

View File

@ -53,8 +53,8 @@ LRESULT CALLBACK extDialogWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPA
// optimization: don't invalidate too often! // optimization: don't invalidate too often!
// 200mSec seems a good compromise. // 200mSec seems a good compromise.
if (tn-t > 200) { if (tn-t > 200) {
(*pInvalidateRect)(hwnd, NULL, TRUE);
t=tn; t=tn;
(*pInvalidateRect)(hwnd, NULL, TRUE);
} }
pWindowProc=dxwws.GetProc(hwnd); pWindowProc=dxwws.GetProc(hwnd);
@ -679,7 +679,6 @@ LRESULT CALLBACK extWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
// v2.02.36: use CallWindowProc that handles WinProc handles // v2.02.36: use CallWindowProc that handles WinProc handles
ret=(*pCallWindowProcA)(pWindowProc, hwnd, message, wparam, lparam); ret=(*pCallWindowProcA)(pWindowProc, hwnd, message, wparam, lparam);
switch(message){ switch(message){
case WM_SIZE: case WM_SIZE:
//case WM_WINDOWPOSCHANGED: - no good!!!! //case WM_WINDOWPOSCHANGED: - no good!!!!

View File

@ -51,6 +51,7 @@ void CTabCompat::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_FIXGLOBALUNLOCK, cTarget->m_FixGlobalUnlock); DDX_Check(pDX, IDC_FIXGLOBALUNLOCK, cTarget->m_FixGlobalUnlock);
DDX_Check(pDX, IDC_FIXFREELIBRARY, cTarget->m_FixFreeLibrary); DDX_Check(pDX, IDC_FIXFREELIBRARY, cTarget->m_FixFreeLibrary);
DDX_Check(pDX, IDC_LOADLIBRARYERR, cTarget->m_LoadLibraryErr); DDX_Check(pDX, IDC_LOADLIBRARYERR, cTarget->m_LoadLibraryErr);
DDX_Check(pDX, IDC_FIXADJUSTWINRECT, cTarget->m_FixAdjustWinRect);
DDX_Check(pDX, IDC_PRETENDVISIBLE, cTarget->m_PretendVisible); DDX_Check(pDX, IDC_PRETENDVISIBLE, cTarget->m_PretendVisible);
DDX_Check(pDX, IDC_WININSULATION, cTarget->m_WinInsulation); DDX_Check(pDX, IDC_WININSULATION, cTarget->m_WinInsulation);

View File

@ -39,6 +39,7 @@ void CTabHook::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_HOOKNOUPDATE, cTarget->m_HookNoUpdate); DDX_Check(pDX, IDC_HOOKNOUPDATE, cTarget->m_HookNoUpdate);
DDX_Check(pDX, IDC_SEQUENCEDIAT, cTarget->m_SequencedIAT); DDX_Check(pDX, IDC_SEQUENCEDIAT, cTarget->m_SequencedIAT);
DDX_Check(pDX, IDC_HOOKCHILDWIN, cTarget->m_HookChildWin); DDX_Check(pDX, IDC_HOOKCHILDWIN, cTarget->m_HookChildWin);
DDX_Check(pDX, IDC_HOOKDLGWIN, cTarget->m_HookDlgWin);
// Kernel32 // Kernel32
DDX_Radio(pDX, IDC_SONDEFAULT, cTarget->m_SonProcessMode); DDX_Radio(pDX, IDC_SONDEFAULT, cTarget->m_SonProcessMode);

View File

@ -90,6 +90,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_FixGlobalUnlock = FALSE; m_FixGlobalUnlock = FALSE;
m_FixFreeLibrary = FALSE; m_FixFreeLibrary = FALSE;
m_LoadLibraryErr = FALSE; m_LoadLibraryErr = FALSE;
m_FixAdjustWinRect = FALSE;
m_NoPixelFormat = FALSE; m_NoPixelFormat = FALSE;
m_NoAlphaChannel = FALSE; m_NoAlphaChannel = FALSE;
m_FixRefCounter = TRUE; // default true !! m_FixRefCounter = TRUE; // default true !!
@ -201,6 +202,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/)
m_FixD3DFrame = FALSE; m_FixD3DFrame = FALSE;
m_NoWindowMove = FALSE; m_NoWindowMove = FALSE;
m_HookChildWin = FALSE; m_HookChildWin = FALSE;
m_HookDlgWin = FALSE;
m_MessageProc = FALSE; m_MessageProc = FALSE;
m_FixMouseHook = FALSE; m_FixMouseHook = FALSE;
m_FixNCHITTEST = FALSE; m_FixNCHITTEST = FALSE;

View File

@ -151,6 +151,7 @@ public:
BOOL m_FixD3DFrame; BOOL m_FixD3DFrame;
BOOL m_NoWindowMove; BOOL m_NoWindowMove;
BOOL m_HookChildWin; BOOL m_HookChildWin;
BOOL m_HookDlgWin;
BOOL m_MessageProc; BOOL m_MessageProc;
BOOL m_FixMouseHook; BOOL m_FixMouseHook;
BOOL m_FixNCHITTEST; BOOL m_FixNCHITTEST;
@ -253,6 +254,7 @@ public:
BOOL m_FixGlobalUnlock; BOOL m_FixGlobalUnlock;
BOOL m_FixFreeLibrary; BOOL m_FixFreeLibrary;
BOOL m_LoadLibraryErr; BOOL m_LoadLibraryErr;
BOOL m_FixAdjustWinRect;
BOOL m_NoPixelFormat; BOOL m_NoPixelFormat;
BOOL m_NoAlphaChannel; BOOL m_NoAlphaChannel;
BOOL m_FixRefCounter; BOOL m_FixRefCounter;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -428,6 +428,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
if(dlg->m_FixGlobalUnlock) t->flags7 |= FIXGLOBALUNLOCK; if(dlg->m_FixGlobalUnlock) t->flags7 |= FIXGLOBALUNLOCK;
if(dlg->m_FixFreeLibrary) t->flags7 |= FIXFREELIBRARY; if(dlg->m_FixFreeLibrary) t->flags7 |= FIXFREELIBRARY;
if(dlg->m_LoadLibraryErr) t->flags8 |= LOADLIBRARYERR; if(dlg->m_LoadLibraryErr) t->flags8 |= LOADLIBRARYERR;
if(dlg->m_FixAdjustWinRect) t->flags8 |= FIXADJUSTWINRECT;
if(dlg->m_NoPixelFormat) t->flags3 |= NOPIXELFORMAT; if(dlg->m_NoPixelFormat) t->flags3 |= NOPIXELFORMAT;
if(dlg->m_NoAlphaChannel) t->flags4 |= NOALPHACHANNEL; if(dlg->m_NoAlphaChannel) t->flags4 |= NOALPHACHANNEL;
if(dlg->m_FixRefCounter) t->flags4 |= FIXREFCOUNTER; if(dlg->m_FixRefCounter) t->flags4 |= FIXREFCOUNTER;
@ -489,6 +490,7 @@ void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg)
if(dlg->m_FixD3DFrame) t->flags3 |= FIXD3DFRAME; if(dlg->m_FixD3DFrame) t->flags3 |= FIXD3DFRAME;
if(dlg->m_NoWindowMove) t->flags3 |= NOWINDOWMOVE; if(dlg->m_NoWindowMove) t->flags3 |= NOWINDOWMOVE;
if(dlg->m_HookChildWin) t->flags |= HOOKCHILDWIN; if(dlg->m_HookChildWin) t->flags |= HOOKCHILDWIN;
if(dlg->m_HookDlgWin) t->flags8 |= HOOKDLGWIN;
if(dlg->m_MessageProc) t->flags |= MESSAGEPROC; if(dlg->m_MessageProc) t->flags |= MESSAGEPROC;
if(dlg->m_FixMouseHook) t->flags8 |= FIXMOUSEHOOK; if(dlg->m_FixMouseHook) t->flags8 |= FIXMOUSEHOOK;
if(dlg->m_FixNCHITTEST) t->flags2 |= FIXNCHITTEST; if(dlg->m_FixNCHITTEST) t->flags2 |= FIXNCHITTEST;
@ -740,6 +742,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
dlg->m_FixGlobalUnlock = t->flags7 & FIXGLOBALUNLOCK ? 1 : 0; dlg->m_FixGlobalUnlock = t->flags7 & FIXGLOBALUNLOCK ? 1 : 0;
dlg->m_FixFreeLibrary = t->flags7 & FIXFREELIBRARY ? 1 : 0; dlg->m_FixFreeLibrary = t->flags7 & FIXFREELIBRARY ? 1 : 0;
dlg->m_LoadLibraryErr = t->flags8 & LOADLIBRARYERR ? 1 : 0; dlg->m_LoadLibraryErr = t->flags8 & LOADLIBRARYERR ? 1 : 0;
dlg->m_FixAdjustWinRect = t->flags8 & FIXADJUSTWINRECT ? 1 : 0;
dlg->m_NoPixelFormat = t->flags3 & NOPIXELFORMAT ? 1 : 0; dlg->m_NoPixelFormat = t->flags3 & NOPIXELFORMAT ? 1 : 0;
dlg->m_NoAlphaChannel = t->flags4 & NOALPHACHANNEL ? 1 : 0; dlg->m_NoAlphaChannel = t->flags4 & NOALPHACHANNEL ? 1 : 0;
dlg->m_FixRefCounter = t->flags4 & FIXREFCOUNTER ? 1 : 0; dlg->m_FixRefCounter = t->flags4 & FIXREFCOUNTER ? 1 : 0;
@ -823,6 +826,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg)
dlg->m_FixD3DFrame = t->flags3 & FIXD3DFRAME ? 1 : 0; dlg->m_FixD3DFrame = t->flags3 & FIXD3DFRAME ? 1 : 0;
dlg->m_NoWindowMove = t->flags3 & NOWINDOWMOVE ? 1 : 0; dlg->m_NoWindowMove = t->flags3 & NOWINDOWMOVE ? 1 : 0;
dlg->m_HookChildWin = t->flags & HOOKCHILDWIN ? 1 : 0; dlg->m_HookChildWin = t->flags & HOOKCHILDWIN ? 1 : 0;
dlg->m_HookDlgWin = t->flags8 & HOOKDLGWIN ? 1 : 0;
dlg->m_MessageProc = t->flags & MESSAGEPROC ? 1 : 0; dlg->m_MessageProc = t->flags & MESSAGEPROC ? 1 : 0;
dlg->m_FixMouseHook = t->flags8 & FIXMOUSEHOOK ? 1 : 0; dlg->m_FixMouseHook = t->flags8 & FIXMOUSEHOOK ? 1 : 0;
dlg->m_FixNCHITTEST = t->flags2 & FIXNCHITTEST ? 1 : 0; dlg->m_FixNCHITTEST = t->flags2 & FIXNCHITTEST ? 1 : 0;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.