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

v2_03_59_src

Former-commit-id: 9721d68addc86a0ea6cba16faeb0c09d802c30b7
This commit is contained in:
gho tik 2016-03-22 12:45:29 -04:00 committed by Refael ACkermann
parent f9dc501eb6
commit fc2d6f47ff
30 changed files with 734 additions and 26 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:22f399a262f8cb3071bb10d366ee021b542e9c13b6122b70370ecc319b970489
oid sha256:5a1ab8f9170fce5bf01058d18f19fba15c7014eb872a8e7a2ec36f4e2ea399bc
size 628736

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:393da7c339ffda956ed69f340401cd4dfeef582666d42a812699a641e698d691
size 558080
oid sha256:9f7c9d1fe78caeb4054e32420034aba59350b965fb86959352d22a1a46a32ea8
size 555520

View File

@ -5,10 +5,10 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=134217730
flagg0=1208025088
flag0=-2013265866
flagg0=1207959552
flagh0=20
flagi0=12
flagi0=4194308
tflag0=0
initx0=0
inity0=0
@ -22,3 +22,14 @@ sizx0=800
sizy0=600
maxfps0=0
initts0=0
launchpath0=
notes0=
registry0=
flagj0=0
flagk0=32768
flagl0=0
flagm0=0
winver0=0
maxres0=0
swapeffect0=0
maxddinterface0=7

View File

@ -5,10 +5,10 @@ module0=
opengllib0=
ver0=0
coord0=0
flag0=671088674
flagg0=1208025088
flag0=671088694
flagg0=1207959552
flagh0=33562644
flagi0=12
flagi0=4194308
tflag0=0
initx0=0
inity0=0
@ -22,3 +22,14 @@ sizx0=800
sizy0=600
maxfps0=0
initts0=0
launchpath0=
notes0=
registry0=
flagj0=0
flagk0=32768
flagl0=0
flagm0=0
winver0=0
maxres0=0
swapeffect0=0
maxddinterface0=7

View File

@ -0,0 +1,29 @@
[target]
title0=Dylan Dog Horror at Luna Park
path0=D:\Games\DylanDog\hlp.exe
launchpath0=
module0=
opengllib0=
notes0=
registry0=
ver0=0
coord0=0
flag0=136314914
flagg0=1744830464
flagh0=1048596
flagi0=138412038
flagj0=5248
flagk0=65536
flagl0=0
flagm0=0
tflag0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1
swapeffect0=0
maxddinterface0=7

View File

@ -28,5 +28,8 @@ launchpath0=
notes0=
registry0=
flagj0=0
flagk0=0
flagk0=32768
swapeffect0=0
flagl0=4
flagm0=0
maxddinterface0=7

View File

@ -0,0 +1,29 @@
[target]
title0=Indiana Jones and the Infernal Machine
path0=D:\Games\Indiana Jones Infernal Machine\Resource\Indy3D.exe
launchpath0=
module0=
opengllib0=
notes0=Beware!\nThe game on nowadays computers works only using a no-cd crack \nand a dedicated installer for 64 bit platforms!
registry0=
ver0=0
coord0=0
flag0=673185826
flagg0=1207959552
flagh0=20
flagi0=-2009071610
flagj0=4224
flagk0=65536
flagl0=0
flagm0=0
tflag0=0
posx0=50
posy0=50
sizx0=800
sizy0=600
maxfps0=0
initts0=0
winver0=0
maxres0=-1
swapeffect0=0
maxddinterface0=7

View File

@ -0,0 +1,29 @@
[target]
title0=SPWaW 2016
path0=D:\Games\The Depot\SPWaW 2016\mech.exe
launchpath0=
module0=
opengllib0=
notes0=
registry0=
ver0=0
coord0=1
flag0=49186
flagg0=1207992338
flagh0=532
flagi0=18907136
flagj0=1152
flagk0=0
flagl0=0
flagm0=0
tflag0=0
posx0=50
posy0=50
sizx0=1340
sizy0=1000
maxfps0=0
initts0=0
winver0=0
maxres0=-1
swapeffect0=0
maxddinterface0=7

View File

@ -9,7 +9,7 @@ flag0=-1476394974
flagg0=1207959618
flagh0=20
flagi0=4194308
tflag0=64
tflag0=0
initx0=0
inity0=0
minx0=0
@ -26,3 +26,10 @@ winver0=0
maxres0=-1
launchpath0=
flagj0=128
notes0=
registry0=
flagk0=0
flagl0=0
flagm0=0
swapeffect0=0
maxddinterface0=7

View File

@ -27,5 +27,9 @@ maxres0=0
launchpath0=
notes0=
flagj0=128
flagk0=0
flagk0=65536
swapeffect0=0
registry0=
flagl0=0
flagm0=0
maxddinterface0=7

View File

@ -3119,7 +3119,8 @@ static HRESULT WINAPI extCreateSurface(int dxversion, CreateSurface_Type pCreate
// seems to fix problems in "Warhammer 40K Rites Of War" that uses a ddraw session after reaching 0 refcount.
// v2.2.84: avoid the extra referenced in non windowed mode since it causes the window shift reported by gsky916
// for Wind Fantasy SP.
if((dxw.dwDDVersion==1) && dxw.Windowize) lpdd->AddRef();
// v2.3.59: same extra reference is needed by "Wahammer Chaos Gate" that uses ddraw interface release 2
if((dxw.dwDDVersion>=2) && dxw.Windowize) lpdd->AddRef();
return DD_OK;
}

View File

@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "TlHelp32.h"
#define VERSION "2.03.58"
#define VERSION "2.03.59"
#define DDTHREADLOCK 1
//#define LOCKTHREADS

Binary file not shown.

432
host/ShimsDialog.cpp Normal file
View File

@ -0,0 +1,432 @@
// ShimsDialog.cpp : implementation file
//
#include "stdafx.h"
#include "dxwndhost.h"
#include "ShimsDialog.h"
// http://msdn2.microsoft.com/en-us/library/bb432457
// PDB WINAPI SdbOpenDatabase(
// LPCTSTR pwszPath,
// PATH_TYPE eType
//);
// What is PDB!? Assuming it is a pointer to somewhere => "void*"
typedef void* PDB;
// http://msdn2.microsoft.com/en-us/library/bb432389.aspx
typedef enum _PATH_TYPE
{
DOS_PATH,
NT_PATH
}PATH_TYPE;
// http://msdn2.microsoft.com/en-us/library/bb432488
typedef DWORD TAGID;
#define TAGID_NULL (0)
#define TAGID_ROOT (0)
// TAG !?
typedef DWORD TAG;
// http://msdn2.microsoft.com/en-us/library/bb432489
typedef DWORD TAGREF;
#define TAGREF_NULL (0)
#define TAGREF_ROOT (0)
// http://msdn2.microsoft.com/en-us/library/bb432490
// TAG-Types:
#define TAG_TYPE_NULL 0x1000
#define TAG_TYPE_BYTE 0x2000
#define TAG_TYPE_WORD 0x3000
#define TAG_TYPE_DWORD 0x4000
#define TAG_TYPE_QWORD 0x5000
#define TAG_TYPE_STRINGREF 0x6000
#define TAG_TYPE_LIST 0x7000
#define TAG_TYPE_STRING 0x8000
#define TAG_TYPE_BINARY 0x9000
// It seems that this type is "masked"
#define TAG_TYPE_MASK 0xF000
// http://msdn2.microsoft.com/en-us/library/bb432487
#define TAG_APP_NAME_RC_ID (0x24 | TAG_TYPE_DWORD)
#define TAG_VENDOR_NAME_RC_ID (0x25 | TAG_TYPE_DWORD)
#define TAG_SUMMARY_MSG_RC_ID (0x26 | TAG_TYPE_DWORD)
#define TAG_DESCRIPTION_RC_ID (0x28 | TAG_TYPE_DWORD)
#define TAG_PARAMETER1_RC_ID (0x29 | TAG_TYPE_DWORD)
#define TAG_EXE_ID (0x4 | TAG_TYPE_BINARY)
#define TAG_DATABASE_ID (0x7 | TAG_TYPE_BINARY)
#define TAG_FIX_ID (0x10 | TAG_TYPE_BINARY)
#define TAG_APP_ID (0x11 | TAG_TYPE_BINARY)
#define CONTEXT_PLATFORM_ID (0x8 | TAG_TYPE_BINARY)
typedef struct TAG_RC_Entry
{
DWORD tag;
LPCWSTR szName;
} TAG_RC_Entry;
// The following tags returns an reference to an resource... (Vista and later)
static TAG_RC_Entry s_TagRcEntries[] =
{
{TAG_APP_NAME_RC_ID, L"APP_NAME_RC_ID"},
{TAG_VENDOR_NAME_RC_ID, L"VENDOR_NAME_RC_ID"},
{TAG_SUMMARY_MSG_RC_ID, L"SUMMARY_MSG_RC_ID"},
{TAG_DESCRIPTION_RC_ID, L"DESCRIPTION_RC_ID"}, // at least for this one, MS forgot to add the mapping from TAG to name (SdbTagToString)
{TAG_PARAMETER1_RC_ID, L"PARAMETER1_RC_ID"},
};
// The following Tags could be displayed as GUIDs (if the len is 0x10)
static DWORD s_TagGuids[] =
{
TAG_EXE_ID,
TAG_DATABASE_ID,
TAG_FIX_ID,
TAG_APP_ID,
CONTEXT_PLATFORM_ID,
};
// APIs:
// http://msdn.microsoft.com/en-us/library/bb432457.aspx
//PDB WINAPI SdbOpenDatabase(
// __in LPCTSTR pwszPath,
// __in PATH_TYPE eType
//);
typedef PDB (WINAPI *PSdbOpenDatabase)(
LPCWSTR pwszPath, // Docu wrong? LPCTSTR shouldn't it be LPCWSTR!?
PATH_TYPE eType
);
PSdbOpenDatabase pSdbOpenDatabase = NULL;
// http://msdn.microsoft.com/en-us/library/cc895520
//void WINAPI SdbCloseDatabase(
// __inout PDB pdb
//);
typedef VOID (WINAPI *PSdbCloseDatabase)(
PDB handle // assuming the passed handle...
);
PSdbCloseDatabase pSdbCloseDatabase = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432446
//TAGID WINAPI SdbGetFirstChild(
// PDB pdb,
// TAGID tiParent
//);
typedef TAGID (WINAPI *PSdbGetFirstChild)(
PDB pdb,
TAGID tiParent
);
PSdbGetFirstChild pSdbGetFirstChild = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432449
//TAGID WINAPI SdbGetNextChild(
// PDB pdb,
// TAGID tiParent,
// TAGID tiPrev
//);
typedef TAGID (WINAPI *PSdbGetNextChild)(
PDB pdb,
TAGID tiParent,
TAGID tiPrev
);
PSdbGetNextChild pSdbGetNextChild = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432451
//TAG WINAPI SdbGetTagFromTagID(
// PDB pdb,
// TAGID tiWhich
//);
typedef TAG (WINAPI *PSdbGetTagFromTagID)(
PDB pdb,
TAGID tiWhich
);
PSdbGetTagFromTagID pSdbGetTagFromTagID = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432470
//LPCTSTR WINAPI SdbTagToString(
// TAG tag
//);
typedef LPCWSTR (WINAPI *PSdbTagToString)( // LPCTSTR => LPCWSTR !?
TAG tag
);
PSdbTagToString pSdbTagToString = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432464
//BOOL WINAPI SdbReadStringTag(
// PDB pdb,
// TAGID tiWhich,
// LPTSTR pwszBuffer,
// DWORD cchBufferSize
//);
typedef BOOL (WINAPI *PSdbReadStringTag)(
PDB pdb,
TAGID tiWhich,
LPTSTR pwszBuffer,
DWORD cchBufferSize
);
PSdbReadStringTag pSdbReadStringTag = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432450.aspx
//LPWSTR WINAPI SdbGetStringTagPtr(
// PDB pdb,
// TAGID tiWhich
//);
typedef LPWSTR (WINAPI *PSdbGetStringTagPtr)(
PDB pdb,
TAGID tiWhich
);
PSdbGetStringTagPtr pSdbGetStringTagPtr = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432462.aspx
//DWORD WINAPI SdbReadDWORDTag(
// PDB pdb,
// TAGID tiWhich,
// DWORD dwDefault
//);
typedef DWORD (WINAPI *PSdbReadDWORDTag)(
PDB pdb,
TAGID tiWhich,
DWORD dwDefault
);
PSdbReadDWORDTag pSdbReadDWORDTag = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432463.aspx
//ULONGLONG WINAPI SdbReadQWORDTag(
// PDB pdb,
// TAGID tiWhich,
// ULONGLONG qwDefault
//);
typedef ULONGLONG (WINAPI *PSdbReadQWORDTag)(
PDB pdb,
TAGID tiWhich,
ULONGLONG qwDefault
);
PSdbReadQWORDTag pSdbReadQWORDTag = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432455
//PDB WINAPI SdbOpenApphelpDetailsDatabase(
// LPCWSTR pwsDetailsDatabasePath
//);
typedef PDB (WINAPI *PSdbOpenApphelpDetailsDatabase)(
LPCWSTR pwsDetailsDatabasePath
);
PSdbOpenApphelpDetailsDatabase pSdbOpenApphelpDetailsDatabase = NULL;
// http://msdn2.microsoft.com/en-us/library/bb432456
//HMODULE WINAPI SdbOpenApphelpResourceFile(
// LPCWSTR pwszACResourceFile
//);
typedef HMODULE (WINAPI *PSdbOpenApphelpResourceFile)(
LPCWSTR pwszACResourceFile
);
PSdbOpenApphelpResourceFile pSdbOpenApphelpResourceFile = NULL;
// http://msdn.microsoft.com/en-us/library/bb432443
//PVOID WINAPI SdbGetBinaryTagData(
// __in PDB pdb,
// __in TAGID tiWhich
//);
typedef PVOID (WINAPI *PSdbGetBinaryTagData)(
PDB pdb,
TAGID tiWhich
);
PSdbGetBinaryTagData pSdbGetBinaryTagData = NULL;
// ???
//DWORD WINAPI SdbGetTagDataSize(
// __in PDB pdb,
// __in TAGID tiWhich
//);
typedef DWORD (WINAPI *PSdbGetTagDataSize)(
PDB pdb,
TAGID tiWhich
);
PSdbGetTagDataSize pSdbGetTagDataSize = NULL;
// http://msdn.microsoft.com/en-us/library/bb432459
#define SDB_MAX_EXES 16
#define SDB_MAX_LAYERS 8
#define SDB_MAX_SDBS 16
typedef struct tagSDBQUERYRESULT {
TAGREF atrExes[SDB_MAX_EXES];
DWORD adwExeFlags[SDB_MAX_EXES];
TAGREF atrLayers[SDB_MAX_LAYERS];
DWORD dwLayerFlags;
TAGREF trApphelp;
DWORD dwExeCount;
DWORD dwLayerCount;
GUID guidID;
DWORD dwFlags;
DWORD dwCustomSDBMap;
GUID rgGuidDB[SDB_MAX_SDBS];
} SDBQUERYRESULT, *PSDBQUERYRESULT;
typedef void* HSDB;
// http://msdn.microsoft.com/en-us/library/bb432448
typedef BOOL (WINAPI *PSdbGetMatchingExe)(
HSDB hSDB,
LPCWSTR szPath,
LPCWSTR szModuleName,
LPCWSTR pszEnvironment,
DWORD dwFlags,
PSDBQUERYRESULT pQueryResult
);
PSdbGetMatchingExe pSdbGetMatchingExe = NULL;
#define SDBGMEF_IGNORE_ENVIRONMENT 1
#define SHIMREG_DISABLE_SHIM 0x1
#define SHIMREG_DISABLE_APPHELP 0x2
#define SHIMREG_APPHELP_NOUI 0x4
#define SHIMREG_APPHELP_CANCEL 0x10000000
#define SHIMREG_DISABLE_SXS 0x10
#define SHIMREG_DISABLE_LAYER 0x20
#define SHIMREG_DISABLE_DRIVER 0x40
typedef void (WINAPI* PSdbReleaseMatchingExe)(
HSDB hSDB,
TAGREF trExe
);
PSdbReleaseMatchingExe pSdbReleaseMatchingExe = NULL;
// CShimsDialog dialog
IMPLEMENT_DYNAMIC(CShimsDialog, CDialog)
CShimsDialog::CShimsDialog(CWnd* pParent /*=NULL*/, char *path)
: CDialog(CShimsDialog::IDD, pParent)
{
//ExePath = (LPWSTR)malloc((strlen(path)+1)*sizeof(WCHAR));
//MultiByteToWideChar(CP_ACP, 0, path, -1, ExePath, strlen(path));
ExePath = path;
}
CShimsDialog::~CShimsDialog()
{
free(ExePath);
ExePath=NULL;
}
void CShimsDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CShimsDialog, CDialog)
END_MESSAGE_MAP()
#define IDStatusTIMER 1
// CShimsDialog message handlers
BOOL CShimsDialog::OnInitDialog()
{
CDialog::OnInitDialog();
char *MatchExe(char *);
this->SetDlgItemText(IDC_STATUSINFO, MatchExe(ExePath));
return TRUE; // return TRUE unless you set the focus to a control
}
void CShimsDialog::OnOK()
{
CDialog::OnOK();
}
void Flags2String(DWORD dwFlags, char *szFlags, size_t flagsLen)
{
szFlags[0] = 0;
if (dwFlags & SHIMREG_DISABLE_SHIM) strcat_s(szFlags, flagsLen, "Disable-Shim,");
if (dwFlags & SHIMREG_DISABLE_APPHELP) strcat_s(szFlags, flagsLen, "Disable-Apphelp,");
if (dwFlags & SHIMREG_APPHELP_NOUI) strcat_s(szFlags, flagsLen, "Apphelp-NoUI,");
if (dwFlags & SHIMREG_APPHELP_CANCEL) strcat_s(szFlags, flagsLen, "Apphelp-Cancel,");
if (dwFlags & SHIMREG_DISABLE_SXS) strcat_s(szFlags, flagsLen, "Disable-SxS,");
if (dwFlags & SHIMREG_DISABLE_LAYER) strcat_s(szFlags, flagsLen, "Disable-Layer,");
if (dwFlags & SHIMREG_DISABLE_DRIVER) strcat_s(szFlags, flagsLen, "Disable-Driver,");
if (szFlags[strlen(szFlags)-1]==',') szFlags[strlen(szFlags)-1]=0;
}
char * MatchExe(char *FileName)
{
SDBQUERYRESULT result;
static char sBuf[10000];
LPWSTR szFileName = (LPWSTR)malloc((strlen(FileName)+1)*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, FileName, -1, szFileName, strlen(FileName));
HINSTANCE hAppHelp = LoadLibrary(_T("apphelp.dll"));
pSdbOpenDatabase = (PSdbOpenDatabase) GetProcAddress(hAppHelp, "SdbOpenDatabase");
pSdbCloseDatabase = (PSdbCloseDatabase) GetProcAddress(hAppHelp, "SdbCloseDatabase");
pSdbGetFirstChild = (PSdbGetFirstChild) GetProcAddress(hAppHelp, "SdbGetFirstChild");
pSdbGetNextChild = (PSdbGetNextChild) GetProcAddress(hAppHelp, "SdbGetNextChild");
pSdbGetTagFromTagID = (PSdbGetTagFromTagID) GetProcAddress(hAppHelp, "SdbGetTagFromTagID");
pSdbTagToString = (PSdbTagToString) GetProcAddress(hAppHelp, "SdbTagToString");
pSdbGetStringTagPtr = (PSdbGetStringTagPtr) GetProcAddress(hAppHelp, "SdbGetStringTagPtr");
//pSdbReadStringTag = (PSdbReadStringTag) GetProcAddress(hAppHelp, "SdbReadStringTag");
pSdbReadDWORDTag = (PSdbReadDWORDTag) GetProcAddress(hAppHelp, "SdbReadDWORDTag");
pSdbReadQWORDTag = (PSdbReadQWORDTag) GetProcAddress(hAppHelp, "SdbReadQWORDTag");
//pSdbOpenApphelpDetailsDatabase = (PSdbOpenApphelpDetailsDatabase) GetProcAddress(hAppHelp, "SdbOpenApphelpDetailsDatabase");
pSdbOpenApphelpResourceFile = (PSdbOpenApphelpResourceFile) GetProcAddress(hAppHelp, "SdbOpenApphelpResourceFile");
pSdbGetBinaryTagData = (PSdbGetBinaryTagData) GetProcAddress(hAppHelp, "SdbGetBinaryTagData");
pSdbGetTagDataSize = (PSdbGetTagDataSize) GetProcAddress(hAppHelp, "SdbGetTagDataSize");
pSdbGetMatchingExe = (PSdbGetMatchingExe) GetProcAddress(hAppHelp, "SdbGetMatchingExe");
pSdbReleaseMatchingExe = (PSdbReleaseMatchingExe) GetProcAddress(hAppHelp, "SdbReleaseMatchingExe");
BOOL bRet = pSdbGetMatchingExe(NULL, (LPCWSTR)szFileName, NULL, NULL, 0, &result);
if (bRet){
sprintf(sBuf, "Shim found for file: %s\n", FileName);
const size_t flagsLen = 1024;
char szFlagsStr[flagsLen];
Flags2String(result.dwFlags, szFlagsStr, flagsLen);
sprintf(sBuf, "%sFlags: 0x%x: %s\n", sBuf, result.dwFlags, szFlagsStr);
if (result.trApphelp != TAGREF_NULL) sprintf(sBuf, "%sAppHelp-Message: 0x%x\n", sBuf, result.trApphelp);
for(DWORD i=0; i<result.dwExeCount; i++){
sprintf(sBuf, "%sExe-Shim: 0x%x, ", sBuf, result.atrExes[i]);
Flags2String(result.adwExeFlags[i], szFlagsStr, flagsLen);
sprintf(sBuf, "%sFlags: 0x%x: %s\n", sBuf, result.adwExeFlags[i], szFlagsStr);
}
for(DWORD i=0; i<result.dwLayerCount; i++){
sprintf(sBuf, "%sLayer-Shim: 0x%x\n", sBuf, result.atrLayers[i]);
}
Flags2String(result.dwLayerFlags, szFlagsStr, flagsLen);
sprintf(sBuf, "%sLayer-Flags: 0x%x: %s\n", sBuf, result.dwLayerFlags, szFlagsStr);
for(DWORD i=0; i<SDB_MAX_SDBS; i++){
if (result.rgGuidDB[i] != GUID_NULL){
sprintf(sBuf, "%sShim-Database: %8.8X-%4.4X-%4.4X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X\n",
sBuf,
result.rgGuidDB[i].Data1,
result.rgGuidDB[i].Data2,
result.rgGuidDB[i].Data3,
result.rgGuidDB[i].Data4[0],
result.rgGuidDB[i].Data4[1],
result.rgGuidDB[i].Data4[2],
result.rgGuidDB[i].Data4[3],
result.rgGuidDB[i].Data4[4],
result.rgGuidDB[i].Data4[5],
result.rgGuidDB[i].Data4[6],
result.rgGuidDB[i].Data4[7]
);
}
}
//pSdbReleaseMatchingExe( ??? );
}
else{
sprintf(sBuf, "No Shim found for file: %s\n", FileName);
}
return sBuf;
}

27
host/ShimsDialog.h Normal file
View File

@ -0,0 +1,27 @@
#pragma once
// CShimsDialog dialog
class CShimsDialog : public CDialog
{
DECLARE_DYNAMIC(CShimsDialog)
public:
CShimsDialog(CWnd* pParent = NULL, char *path = NULL); // standard constructor
virtual ~CShimsDialog();
// Dialog Data
enum { IDD = IDD_SHIMS };
int iTimeSlider;
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
protected:
virtual void OnOK();
private:
char *ExePath;
};

48
host/TabHook.cpp Normal file
View File

@ -0,0 +1,48 @@
// TabHook.cpp : implementation file
//
#include "stdafx.h"
#include "TargetDlg.h"
#include "TabHook.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTabHook dialog
CTabHook::CTabHook(CWnd* pParent /*=NULL*/)
// : CTargetDlg(pParent)
: CDialog(CTabHook::IDD, pParent)
{
//{{AFX_DATA_INIT(CTabHook)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CTabHook::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
CTargetDlg *cTarget = ((CTargetDlg *)(this->GetParent()->GetParent()));
DDX_Text(pDX, IDC_MODULE, cTarget->m_Module);
DDX_Check(pDX, IDC_HOOKENABLED, cTarget->m_HookEnabled);
DDX_Check(pDX, IDC_STARTDEBUG, cTarget->m_StartDebug);
DDX_Check(pDX, IDC_HOTPATCH, cTarget->m_HotPatch);
DDX_Check(pDX, IDC_HOOKDLLS, cTarget->m_HookDLLs);
DDX_Check(pDX, IDC_HOOKCHILDWIN, cTarget->m_HookChildWin);
// Kernel32
DDX_Radio(pDX, IDC_SONDEFAULT, cTarget->m_SonProcessMode);
}
BEGIN_MESSAGE_MAP(CTabHook, CDialog)
//{{AFX_MSG_MAP(CTabHook)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTabHook message handlers

49
host/TabHook.h Normal file
View File

@ -0,0 +1,49 @@
#if !defined(AFX_TABMOUSE_H__12345678_C906_446C_822D_322B5AB6C4C4__INCLUDED_)
#define AFX_TABMOUSE_H__12345678_C906_446C_822D_322B5AB6C4C4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TabHook.h : header file
//
#include "resource.h"
#include "TargetDlg.h"
/////////////////////////////////////////////////////////////////////////////
// CTabHook dialog
//class CTabHook : public CTargetDlg
class CTabHook : public CDialog
{
// Construction
public:
CTabHook(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CTabDirectX)
enum { IDD = IDD_TAB_HOOK };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTabDirectX)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CTabDirectX)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TABTHREE_H__798A9124_C906_446C_822D_322B5AB6C4C4__INCLUDED_)

View File

@ -41,18 +41,12 @@ void CTabProgram::DoDataExchange(CDataExchange* pDX)
DDX_Text(pDX, IDC_FILE, cTarget->m_FilePath);
DDX_Text(pDX, IDC_LAUNCH, cTarget->m_LaunchPath);
DDX_Text(pDX, IDC_TITLE, cTarget->m_Title);
DDX_Text(pDX, IDC_MODULE, cTarget->m_Module);
DDX_Check(pDX, IDC_NEEDADMINCAPS, cTarget->m_NeedAdminCaps);
DDX_Check(pDX, IDC_UNNOTIFY, cTarget->m_UnNotify);
DDX_Check(pDX, IDC_WINDOWIZE, cTarget->m_Windowize);
DDX_Check(pDX, IDC_HOTPATCH, cTarget->m_HotPatch);
DDX_Check(pDX, IDC_HOOKDLLS, cTarget->m_HookDLLs);
DDX_Check(pDX, IDC_CONFIRMONCLOSE, cTarget->m_ConfirmOnClose);
DDX_Check(pDX, IDC_TERMINATEONCLOSE, cTarget->m_TerminateOnClose);
DDX_Check(pDX, IDC_FULLSCREENONLY, cTarget->m_FullScreenOnly);
DDX_Check(pDX, IDC_HOOKCHILDWIN, cTarget->m_HookChildWin);
DDX_Check(pDX, IDC_HOOKENABLED, cTarget->m_HookEnabled);
DDX_Check(pDX, IDC_STARTDEBUG, cTarget->m_StartDebug);
DDX_Check(pDX, IDC_SAVELOAD, cTarget->m_SaveLoad);
DDX_Check(pDX, IDC_KEEPASPECTRATIO, cTarget->m_KeepAspectRatio);
DDX_Check(pDX, IDC_NOBANNER, cTarget->m_NoBanner);

View File

@ -52,9 +52,6 @@ void CTabSysLibs::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_STRETCHMOVIES, cTarget->m_StretchMovies);
DDX_Check(pDX, IDC_FIXMOVIESCOLOR, cTarget->m_FixMoviesColor);
DDX_Check(pDX, IDC_BYPASSMCI, cTarget->m_BypassMCI);
// Kernel32
DDX_Radio(pDX, IDC_SONDEFAULT, cTarget->m_SonProcessMode);
}
BEGIN_MESSAGE_MAP(CTabSysLibs, CDialog)

View File

@ -241,6 +241,8 @@ BOOL CTargetDlg::OnInitDialog()
char sCaption[48+1];
LoadString(AfxGetResourceHandle(), DXW_TAB_MAIN, sCaption, sizeof(sCaption));
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
LoadString(AfxGetResourceHandle(), DXW_TAB_HOOK, sCaption, sizeof(sCaption));
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
LoadString(AfxGetResourceHandle(), DXW_TAB_VIDEO, sCaption, sizeof(sCaption));
m_tabdxTabCtrl.InsertItem(i++, _T(sCaption));
LoadString(AfxGetResourceHandle(), DXW_TAB_INPUT, sCaption, sizeof(sCaption));

View File

@ -22,7 +22,7 @@
#include "dxTabCtrl.h"
#include "TabProgram.h"
#include "TabLogs.h"
#include "TabHook.h"
#include "TabDirectX.h"
#include "TabDirect3D.h"
#include "TabInput.h"
@ -31,6 +31,7 @@
#include "TabOpenGL.h"
#include "TabCompat.h"
#include "TabColor.h"
#include "TabLogs.h"
#include "TabRegistry.h"
#include "TabNotes.h"
#include "TabSysLibs.h"
@ -51,6 +52,7 @@ CDXTabCtrl::CDXTabCtrl()
{
int i=0;
m_tabPages[i++]=new CTabProgram;
m_tabPages[i++]=new CTabHook;
m_tabPages[i++]=new CTabWindow;
m_tabPages[i++]=new CTabInput;
m_tabPages[i++]=new CTabDirectX;
@ -79,6 +81,7 @@ void CDXTabCtrl::Init()
m_tabCurrent=0;
m_tabPages[i++]->Create(IDD_TAB_PROGRAM, this);
m_tabPages[i++]->Create(IDD_TAB_HOOK, this);
m_tabPages[i++]->Create(IDD_TAB_OUTPUT, this);
m_tabPages[i++]->Create(IDD_TAB_INPUT, this);
m_tabPages[i++]->Create(IDD_TAB_DIRECTX, this);

View File

@ -16,7 +16,7 @@ class CDXTabCtrl : public CTabCtrl
// Construction
public:
CDXTabCtrl();
CDialog *m_tabPages[12]; // this must match the total number of tab elements!
CDialog *m_tabPages[13]; // this must match the total number of tab elements!
int m_tabCurrent;
int m_nNumberOfPages;
enum { IDD = IDC_TABPANEL };

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -373,6 +373,10 @@
RelativePath=".\PaletteDialog.h"
>
</File>
<File
RelativePath=".\ShimsDialog.cpp"
>
</File>
<File
RelativePath=".\StatusDialog.cpp"
>
@ -423,6 +427,10 @@
RelativePath=".\TabDirectX.cpp"
>
</File>
<File
RelativePath=".\TabHook.cpp"
>
</File>
<File
RelativePath=".\TabInput.cpp"
>
@ -548,6 +556,10 @@
RelativePath=".\TabDirectX.h"
>
</File>
<File
RelativePath=".\TabHook.h"
>
</File>
<File
RelativePath=".\TabInput.h"
>

View File

@ -16,6 +16,7 @@
#include "DesktopDialog.h"
#include "PaletteDialog.h"
#include "TimeSliderDialog.h"
#include "ShimsDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@ -133,6 +134,7 @@ BEGIN_MESSAGE_MAP(CDxwndhostView, CListView)
ON_COMMAND(ID_RUN, OnRun)
ON_COMMAND(ID_TRAY_RESTORE, OnTrayRestore)
ON_COMMAND(ID_VIEW_STATUS, OnViewStatus)
ON_COMMAND(ID_VIEW_SHIMS, OnViewShims)
ON_COMMAND(ID_VIEW_DESKTOP, OnViewDesktop)
ON_COMMAND(ID_VIEW_PALETTE, OnViewPalette)
ON_COMMAND(ID_VIEW_TIMESLIDER, OnViewTimeSlider)
@ -2115,6 +2117,22 @@ void CDxwndhostView::OnViewStatus()
pDlg->ShowWindow(SW_SHOW);
}
void CDxwndhostView::OnViewShims()
{
POSITION pos;
int i;
char *ExePath;
CListCtrl& listctrl = GetListCtrl();
if(!(pos = listctrl.GetFirstSelectedItemPosition())) return;
i = listctrl.GetNextSelectedItem(pos);
ExePath = TargetMaps[i].path;
CShimsDialog *pDlg = new CShimsDialog(NULL, ExePath);
BOOL ret = pDlg->Create(CShimsDialog::IDD, this);
pDlg->ShowWindow(SW_SHOW);
}
void CDxwndhostView::OnViewDesktop()
{
CDesktopDialog *pDlg = new CDesktopDialog();
@ -2377,7 +2395,8 @@ DWORD WINAPI StartDebug(void *p)
}
if(TargetHandle) CloseHandle((HANDLE)TargetHandle);
#endif
bContinueDebugging=false;
// commented out: apparently, there must be some previous thread that starts before the hooker
// bContinueDebugging=false;
break;
case LOAD_DLL_DEBUG_EVENT:
CloseHandle(((LOAD_DLL_DEBUG_INFO *)&debug_event.u)->hFile);

View File

@ -91,6 +91,7 @@ protected:
afx_msg void OnHookStop();
afx_msg void OnTrayRestore();
afx_msg void OnViewStatus();
afx_msg void OnViewShims();
afx_msg void OnViewDesktop();
afx_msg void OnViewPalette();
afx_msg void OnViewTimeSlider();

Binary file not shown.

Binary file not shown.