updated to v11.01 by Yohann

This commit is contained in:
ChaosMarc
2017-01-23 20:34:12 +01:00
parent 1f35a1a5a8
commit 3f60030fbb
140 changed files with 4042 additions and 8138 deletions

Binary file not shown.

View File

@@ -1,3 +1,4 @@
/*=================================================================
File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
@@ -5,155 +6,110 @@
Patch D2gfx.dll to install PlugY.
=================================================================*/
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
#include "../Commons/VersionInfo.h"
#include <windows.h>
#include <stdio.h>
#include "../Commons/VersionInfo.h"
const char* boxNameInstall = "Installation of PlugY, The Survival Kit Installation";
const char* boxNameUnInstall = "Uninstall PlugY, The Survival Kit ";
int CALL_LOAD[8] = {0x389B,0x389B,0x3870,0x8B23,0xB423,0x8F63,0xB423,0xAA03};
BYTE callNewLoad[8][6]={{0xE8,0x60,0x85,0x00,0x00,0x90},// JMP 6FA7BE00-6FA738A0 ;install loadlibrary
{0xE8,0x60,0x85,0x00,0x00,0x90},// JMP 6FA7BE00-6FA738A0 ;install loadlibrary
{0xE8,0x8B,0x85,0x00,0x00,0x90},// JMP 6FA7BE00-6FA73875 ;install loadlibrary
{0xE8,0xD8,0x42,0x00,0x00,0x90},// JMP 6FA8CE00-6FA88B28 ;install loadlibrary
{0xE8,0xD8,0x19,0x00,0x00,0x90},// JMP 6FA8CE00-6FA8B428 ;install loadlibrary
{0xE8,0x98,0x3E,0x00,0x00,0x90},// JMP 6FA8CE00-6FA88F68 ;install loadlibrary
{0xE8,0xD8,0x19,0x00,0x00,0x90},// JMP 6FA8CE00-6FA8B428 ;install loadlibrary
{0xE8,0xF8,0x23,0x00,0x00,0x90}};// JMP 6FA8CE00-6FA8B428 ;install loadlibrary
BYTE callOldLoad[8][6]={{0xFF,0x15,0x3C,0xC0,0xA7,0x6F},
{0xFF,0x15,0x3C,0xC0,0xA7,0x6F},
{0xFF,0x15,0x40,0xC0,0xA7,0x6F},
{0xFF,0x15,0x1C,0xD1,0xA8,0x6F},
{0xFF,0x15,0x1C,0xD1,0xA8,0x6F},
{0xFF,0x15,0x1C,0xD1,0xA8,0x6F},
{0xFF,0x15,0x1C,0xD1,0xA8,0x6F},
{0xFF,0x15,0x1C,0xD1,0xA8,0x6F}};
int CALL_LOAD[8] = { 0x389B,0x389B,0x3870,0x8B23,0xB423,0x8F63,0xB423,0xAA03 };
BYTE callNewLoad[8][6] = { { 0xE8,0x60,0x85,0x00,0x00,0x90 },// JMP 6FA7BE00-6FA738A0 ;install loadlibrary
{ 0xE8,0x60,0x85,0x00,0x00,0x90 },// JMP 6FA7BE00-6FA738A0 ;install loadlibrary
{ 0xE8,0x8B,0x85,0x00,0x00,0x90 },// JMP 6FA7BE00-6FA73875 ;install loadlibrary
{ 0xE8,0xD8,0x42,0x00,0x00,0x90 },// JMP 6FA8CE00-6FA88B28 ;install loadlibrary
{ 0xE8,0xD8,0x19,0x00,0x00,0x90 },// JMP 6FA8CE00-6FA8B428 ;install loadlibrary
{ 0xE8,0x98,0x3E,0x00,0x00,0x90 },// JMP 6FA8CE00-6FA88F68 ;install loadlibrary
{ 0xE8,0xD8,0x19,0x00,0x00,0x90 },// JMP 6FA8CE00-6FA8B428 ;install loadlibrary
{ 0xE8,0xF8,0x23,0x00,0x00,0x90 }};// JMP 6FA8CE00-6FA8B428 ;install loadlibrary
BYTE callOldLoad[8][6] = { { 0xFF,0x15,0x3C,0xC0,0xA7,0x6F },
{ 0xFF,0x15,0x3C,0xC0,0xA7,0x6F },
{ 0xFF,0x15,0x40,0xC0,0xA7,0x6F },
{ 0xFF,0x15,0x1C,0xD1,0xA8,0x6F },
{ 0xFF,0x15,0x1C,0xD1,0xA8,0x6F },
{ 0xFF,0x15,0x1C,0xD1,0xA8,0x6F },
{ 0xFF,0x15,0x1C,0xD1,0xA8,0x6F },
{ 0xFF,0x15,0x1C,0xD1,0xA8,0x6F }};
int CALL_FREE[8] = {0x3A8C,0x3A8C,0x3A6D,0x8ACA,0xB3CA,0x8F0A,0xB3CA,0xA9AA};
BYTE callNewFree[8][6]={{0xE8,0xAF,0x83,0x00,0x00,0x90}, // JMP 6FA7BE40-6FA73A91 ;install freelibrary
{0xE8,0xAF,0x83,0x00,0x00,0x90}, // JMP 6FA7BE40-6FA73A91 ;install freelibrary
{0xE8,0xD2,0x83,0x00,0x00,0x90}, // JMP 6FA7BE44-6FA73A72 ;install freelibrary
{0xE8,0x75,0x43,0x00,0x00,0x90}, // JMP 6FA8CE44-6FA88ACF ;install freelibrary
{0xE8,0x75,0x1A,0x00,0x00,0x90}, // JMP 6FA8CE44-6FA8B3CF ;install freelibrary
{0xE8,0x35,0x3F,0x00,0x00,0x90}, // JMP 6FA8CE44-6FA88F0F ;install freelibrary
{0xE8,0x75,0x1A,0x00,0x00,0x90}, // JMP 6FA8CE44-6FA8B3CF ;install freelibrary
{0xE8,0x95,0x24,0x00,0x00,0x90}};// JMP 6FA8CE44-6FA8B3CF ;install freelibrary
BYTE callOldFree[8][6]={{0xFF,0x15,0x44,0xC0,0xA7,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{0xFF,0x15,0x44,0xC0,0xA7,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{0xFF,0x15,0x48,0xC0,0xA7,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{0xFF,0x15,0x2C,0xD1,0xA8,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{0xFF,0x15,0x2C,0xD1,0xA8,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{0xFF,0x15,0x2C,0xD1,0xA8,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{0xFF,0x15,0x2C,0xD1,0xA8,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{0xFF,0x15,0x24,0xD1,0xA8,0x6F}};// CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
int CALL_FREE[8] = { 0x3A8C,0x3A8C,0x3A6D,0x8ACA,0xB3CA,0x8F0A,0xB3CA,0xA9AA };
BYTE callNewFree[8][6] = { { 0xE8,0xAF,0x83,0x00,0x00,0x90 }, // JMP 6FA7BE40-6FA73A91 ;install freelibrary
{ 0xE8,0xAF,0x83,0x00,0x00,0x90 }, // JMP 6FA7BE40-6FA73A91 ;install freelibrary
{ 0xE8,0xD2,0x83,0x00,0x00,0x90 }, // JMP 6FA7BE44-6FA73A72 ;install freelibrary
{ 0xE8,0x75,0x43,0x00,0x00,0x90 }, // JMP 6FA8CE44-6FA88ACF ;install freelibrary
{ 0xE8,0x75,0x1A,0x00,0x00,0x90 }, // JMP 6FA8CE44-6FA8B3CF ;install freelibrary
{ 0xE8,0x35,0x3F,0x00,0x00,0x90 }, // JMP 6FA8CE44-6FA88F0F ;install freelibrary
{ 0xE8,0x75,0x1A,0x00,0x00,0x90 },// JMP 6FA8CE44-6FA8B3CF ;install freelibrary
{ 0xE8,0x95,0x24,0x00,0x00,0x90 }};// JMP 6FA8CE44-6FA8B3CF ;install freelibrary
BYTE callOldFree[8][6] = { { 0xFF,0x15,0x44,0xC0,0xA7,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{ 0xFF,0x15,0x44,0xC0,0xA7,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{ 0xFF,0x15,0x48,0xC0,0xA7,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{ 0xFF,0x15,0x2C,0xD1,0xA8,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{ 0xFF,0x15,0x2C,0xD1,0xA8,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{ 0xFF,0x15,0x2C,0xD1,0xA8,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{ 0xFF,0x15,0x2C,0xD1,0xA8,0x6F },// CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
{ 0xFF,0x15,0x24,0xD1,0xA8,0x6F }};// CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>]
int CALLER_LOADPLUGY = 0xBE00;//6FA7BE00-6FA70000
BYTE caller_LoadPlugY[]={
0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4]
0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA
0x50, //PUSH EAX
0x68,0x80,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE80 ; ASCII "PlugY.dll"
0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA
0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX
0x85,0xC0, //TEST EAX,EAX
0x74,0x18, //JE SHORT d2gfx.6FA7BE37
0x68,0x90,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE10 ;Init ID
0x50, //PUSH EAX
0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAddress>] ; kernel32.GetProcAddress
0x85,0xC0, //TEST EAX,EAX
0x74,0x04, //JE SHORT d2gfx.6FA7BDC1
0x6A,0x00, //PUSH 0
0xFF,0xD0, //CALL EAX
0x58, //POP EAX
0xC2,0x04,0x00, //RETN 4
0x59, //POP ECX
0xB9,0x80,0xBE,0xA7,0x6F, //MOV ECX,d2gfx.6FA7BE80 ; ASCII "PlugY.dll"
0x83,0x04,0x24,0x11, //ADD DWORD PTR SS:[ESP],11
0xC2,0x04,0x00}; //RETN 4
BYTE caller_LoadPlugY[] = {
0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4]
0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA
0x50, //PUSH EAX
0x68,0x80,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE80 ; ASCII "PlugY.dll"
0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA
0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX
0x85,0xC0, //TEST EAX,EAX
0x74,0x18, //JE SHORT d2gfx.6FA7BE37
0x68,0x90,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE10 ;Init ID
0x50, //PUSH EAX
0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAddress>] ; kernel32.GetProcAddress
0x85,0xC0, //TEST EAX,EAX
0x74,0x04, //JE SHORT d2gfx.6FA7BDC1
0x6A,0x00, //PUSH 0
0xFF,0xD0, //CALL EAX
0x58, //POP EAX
0xC2,0x04,0x00, //RETN 4
0x59, //POP ECX
0xB9,0x80,0xBE,0xA7,0x6F, //MOV ECX,d2gfx.6FA7BE80 ; ASCII "PlugY.dll"
0x83,0x04,0x24,0x11, //ADD DWORD PTR SS:[ESP],11
0xC2,0x04,0x00 }; //RETN 4
int CALLER_FREEPLUGY = 0xBE44;//6FA7BE44-6FA70000
BYTE caller_FreePlugY[]={
0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4]
0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] ; kernel32.FreeLibrary
0x50, //PUSH EAX
0xA1,0xFC,0xEF,0xA8,0x6F, //MOV EAX,DWORD PTR DS:[6FA8EFFC]
0x85,0xC0, //TEST EAX,EAX
0x74,0x20, //JE SHORT d2gfx.6FA7BE74
0x50, //PUSH EAX
0x68,0xA0,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE20 ;release
0x50, //PUSH EAX
0x33,0xC0, //XOR EAX,EAX
0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX
0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress
0x85,0xC0, //TEST EAX,EAX
0x74,0x02, //JE SHORT d2gfx.6FA7BDEF
0xFF,0xD0, //CALL EAX
0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrar>; kernel32.FreeLibrary
0x58, //POP EAX
0xC2,0x04,0x00}; //RETN 4
BYTE caller_FreePlugY[] = {
0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4]
0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] ; kernel32.FreeLibrary
0x50, //PUSH EAX
0xA1,0xFC,0xEF,0xA8,0x6F, //MOV EAX,DWORD PTR DS:[6FA8EFFC]
0x85,0xC0, //TEST EAX,EAX
0x74,0x20, //JE SHORT d2gfx.6FA7BE74
0x50, //PUSH EAX
0x68,0xA0,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE20 ;release
0x50, //PUSH EAX
0x33,0xC0, //XOR EAX,EAX
0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX
0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress
0x85,0xC0, //TEST EAX,EAX
0x74,0x02, //JE SHORT d2gfx.6FA7BDEF
0xFF,0xD0, //CALL EAX
0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrar>; kernel32.FreeLibrary
0x58, //POP EAX
0xC2,0x04,0x00 }; //RETN 4
int S_DLLNAME = 0xBE80;//6FA7BE30-6FA70000
BYTE sDllName[]={'P','l','u','g','Y','.','d','l','l',0};// Dll filename to load.
BYTE sDllName[] = { 'P','l','u','g','Y','.','d','l','l',0 };// Dll filename to load.
int S_INIT = 0xBE90;//6FA7BE10-6FA70000
BYTE sInit[]={'_','I','n','i','t','@','4',0};
BYTE sInit[] = { '_','I','n','i','t','@','4',0 };
int S_RELEASE = 0xBEA0;//6FA7BE20-6FA70000
BYTE sRelease[]={'_','R','e','l','e','a','s','e','@','0',0};
enum eFileVersion
{
V109b=0,
V109d,
V110,
V111,
V111b,
V112,
V113c,
V113d
};
/*
int getVersion(FILE *dll)
{
int ver;
//GET_VERSION(D2gfx, 80, 110, 0x00949FA8, 0x018866A8, 0x401526B2, 0x575C8A5E, 0x42E6C22A, 0x43028B19, 0xACBE1B9E, 0x00000000);
int addr;
fseek(dll,0x80,SEEK_SET);
fread(&addr,sizeof(addr),1,dll);
if (addr == 0x00949FA8)
ver = V109b;
else if (addr == 0x018866A8)
ver = V109d;
else if (addr == 0x401526B2)
ver = V110;
else if (addr == 0x575C8A5E)
{
fseek(dll,0x110,SEEK_SET);
fread(&addr,sizeof(addr),1,dll);
if (addr == 0x42E6C22A)
ver = V111;
else if (addr == 0x43028B19)
ver = V111b;
else
ver = UNKNOW;
}
else if (addr == 0xACBE1B9E)
ver = V112;
else if (addr == 0xACBE1BB6)
ver = V113c;
else
ver = UNKNOW;
return ver;
}
*/
BYTE sRelease[] = { '_','R','e','l','e','a','s','e','@','0',0 };
void updateData(int version)
{
switch(version)
switch (version)
{
case V109b:
case V109d:
@@ -179,16 +135,9 @@ void updateData(int version)
*(DWORD*)(&caller_LoadPlugY[6]) = 0x6FA8D11C;
*(DWORD*)(&caller_LoadPlugY[18]) = 0x6FA8D11C;
*(DWORD*)(&caller_LoadPlugY[39]) = 0x6FA8D120;
if (version == V113d)
{
*(DWORD*)(&caller_FreePlugY[6]) = 0x6FA8D124;
*(DWORD*)(&caller_FreePlugY[48]) = 0x6FA8D124;
} else
{
*(DWORD*)(&caller_FreePlugY[6]) = 0x6FA8D12C;
*(DWORD*)(&caller_FreePlugY[48]) = 0x6FA8D12C;
}
*(DWORD*)(&caller_FreePlugY[6]) = (version == V113d) ? 0x6FA8D124 : 0x6FA8D12C;
*(DWORD*)(&caller_FreePlugY[36]) = 0x6FA8D120;
*(DWORD*)(&caller_FreePlugY[48]) = (version == V113d) ? 0x6FA8D124 : 0x6FA8D12C;
caller_LoadPlugY[13] += 0x10;
caller_LoadPlugY[14]++;
caller_LoadPlugY[25]++;
@@ -203,55 +152,39 @@ void updateData(int version)
break;
}
}
////////////////////////////// EXPORTED FUNCTIONS //////////////////////////////
int GetD2Ver()
{
char currentpath[MAX_PATH];
if (! GetD2Path(currentpath, MAX_PATH))
{
MessageBox(0,"Can't find path to Game.exe.",
boxNameInstall, MB_OK|MB_ICONEXCLAMATION);
exit(0);;
}
return GetD2Version(currentpath);
}
void Patch()
{
if (MessageBox(0,"This programm will modify the D2gfx.dll file of the current directory.\n"
"Before continue, don't forgot to backup D2gfx.dll if you want\n"
"Do you want patch D2gfx.dll for the launch of PlugY ?",
boxNameInstall, MB_YESNO|MB_ICONQUESTION) == IDNO)
if (MessageBox(0, "This programm will modify the D2gfx.dll file of the current directory.\n"
"Before continue, don't forgot to backup D2gfx.dll if you want\n"
"Do you want patch D2gfx.dll for the launch of PlugY ?",
boxNameInstall, MB_YESNO | MB_ICONQUESTION) == IDNO)
{
MessageBox(0,"D2gfx.dll isn't patched.\n",
boxNameInstall, MB_OK|MB_ICONASTERISK);
MessageBox(0, "D2gfx.dll isn't patched.\n",
boxNameInstall, MB_OK | MB_ICONASTERISK);
exit(0);
}
FILE *dll=fopen("d2gfx.dll","rb+");
FILE *dll;
if(!dll)
if (fopen_s(&dll, "d2gfx.dll", "rb+"))
{
MessageBox(0,"Can't open D2gfx.dll in read/write mode\n"
"If Diablo II is running you can\'t install PlugY, The Survival Kit.\n"
"Quit Diablo II and try again.",
boxNameInstall, MB_OK|MB_ICONEXCLAMATION);
MessageBox(0, "Can't open D2gfx.dll in read/write mode.\n"
"If Diablo II is running you can\'t install PlugY, The Survival Kit.\n"
"Quit Diablo II and try again.",
boxNameInstall, MB_OK | MB_ICONEXCLAMATION);
exit(0);
}
//int version = getVersion(dll);
int version = GetD2Ver();
int version = GetD2Version("Game.exe");
//if (version == UNKNOW)
if (version == -1)
if (version < V109 || version > V113d)
{
MessageBox(0,"Bad version of D2gfx.dll.\n"
"You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n"
"Or re-install a clean version (between 1.09 and 1.12) of LOD.",
boxNameInstall, MB_OK|MB_ICONEXCLAMATION);
MessageBox(0, "Bad version of D2gfx.dll.\n"
"You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n"
"Or re-install a clean version (between 1.09 and 1.13d) of LOD.",
boxNameInstall, MB_OK | MB_ICONEXCLAMATION);
exit(0);
}
@@ -261,86 +194,89 @@ void Patch()
int ident = 0;
BYTE buffer[100];
BYTE zeros[100];
memset(zeros,0,sizeof(zeros));
memset(zeros, 0, sizeof(zeros));
fseek(dll,CALL_LOAD[version],SEEK_SET);
fread(buffer,6,1,dll);
if(memcmp(buffer, callOldLoad[version], 6) !=0 ) error = true;
if(memcmp(buffer, callNewLoad[version], 6) ==0 ) ident++;
version -= V109b;
fseek(dll,CALL_FREE[version],SEEK_SET);
fread(buffer,6,1,dll);
if(memcmp(buffer, callOldFree[version], 6) !=0 ) error = true;
if(memcmp(buffer, callNewFree[version], 6) ==0 ) ident++;
fseek(dll, CALL_LOAD[version], SEEK_SET);
fread(buffer, 6, 1, dll);
if (memcmp(buffer, callOldLoad[version], 6) != 0) error = true;
if (memcmp(buffer, callNewLoad[version], 6) == 0) ident++;
fseek(dll,CALLER_LOADPLUGY,SEEK_SET);
fread(buffer,sizeof(caller_LoadPlugY),1,dll);
if(memcmp(buffer, zeros, sizeof(caller_LoadPlugY)) !=0 ) error = true;
if(memcmp(buffer, caller_LoadPlugY, sizeof(caller_LoadPlugY)) ==0 ) ident++;
fseek(dll, CALL_FREE[version], SEEK_SET);
fread(buffer, 6, 1, dll);
if (memcmp(buffer, callOldFree[version], 6) != 0) error = true;
if (memcmp(buffer, callNewFree[version], 6) == 0) ident++;
fseek(dll,CALLER_FREEPLUGY,SEEK_SET);
fread(buffer,sizeof(caller_FreePlugY),1,dll);
if(memcmp(buffer, zeros, sizeof(caller_FreePlugY)) !=0 ) error = true;
if(memcmp(buffer, caller_FreePlugY, sizeof(caller_FreePlugY)) ==0 ) ident++;
fseek(dll, CALLER_LOADPLUGY, SEEK_SET);
fread(buffer, sizeof(caller_LoadPlugY), 1, dll);
if (memcmp(buffer, zeros, sizeof(caller_LoadPlugY)) != 0) error = true;
if (memcmp(buffer, caller_LoadPlugY, sizeof(caller_LoadPlugY)) == 0) ident++;
fseek(dll,S_INIT,SEEK_SET);
fread(buffer,sizeof(sInit),1,dll);
if(memcmp(buffer, zeros, sizeof(sInit)) !=0 ) error = true;
if(memcmp(buffer, sInit, sizeof(sInit)) ==0 ) ident++;
fseek(dll, CALLER_FREEPLUGY, SEEK_SET);
fread(buffer, sizeof(caller_FreePlugY), 1, dll);
if (memcmp(buffer, zeros, sizeof(caller_FreePlugY)) != 0) error = true;
if (memcmp(buffer, caller_FreePlugY, sizeof(caller_FreePlugY)) == 0) ident++;
fseek(dll,S_RELEASE,SEEK_SET);
fread(buffer,sizeof(sRelease),1,dll);
if(memcmp(buffer, zeros, sizeof(sRelease)) !=0 ) error = true;
if(memcmp(buffer, sRelease, sizeof(sRelease)) ==0 ) ident++;
fseek(dll, S_INIT, SEEK_SET);
fread(buffer, sizeof(sInit), 1, dll);
if (memcmp(buffer, zeros, sizeof(sInit)) != 0) error = true;
if (memcmp(buffer, sInit, sizeof(sInit)) == 0) ident++;
fseek(dll,S_DLLNAME,SEEK_SET);
fread(buffer,sizeof(sDllName),1,dll);
if(memcmp(buffer, zeros, sizeof(sDllName)) !=0 ) error = true;
if(memcmp(buffer, sDllName, sizeof(sDllName)) ==0 ) ident++;
fseek(dll, S_RELEASE, SEEK_SET);
fread(buffer, sizeof(sRelease), 1, dll);
if (memcmp(buffer, zeros, sizeof(sRelease)) != 0) error = true;
if (memcmp(buffer, sRelease, sizeof(sRelease)) == 0) ident++;
fseek(dll, S_DLLNAME, SEEK_SET);
fread(buffer, sizeof(sDllName), 1, dll);
if (memcmp(buffer, zeros, sizeof(sDllName)) != 0) error = true;
if (memcmp(buffer, sDllName, sizeof(sDllName)) == 0) ident++;
if (error)
{
if (ident==7)
if (ident == 7)
{
MessageBox(0, "PlugY, The Survival Kit already installed.",
boxNameInstall, MB_OK|MB_ICONASTERISK);
boxNameInstall, MB_OK | MB_ICONASTERISK);
exit(0);
} else
}
else
{
MessageBox(0,"Bad version of D2gfx.dll.\n"
"You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n"
"Or re-install a clean version (between 1.09 and 1.11b) of LOD.",
boxNameInstall, MB_OK|MB_ICONEXCLAMATION);
MessageBox(0, "Bad version of D2gfx.dll.\n"
"You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n"
"Or re-install a clean version (between 1.09 and 1.13d) of LOD.",
boxNameInstall, MB_OK | MB_ICONEXCLAMATION);
exit(0);
}
}
fseek(dll,CALL_LOAD[version],SEEK_SET);
fseek(dll, CALL_LOAD[version], SEEK_SET);
fwrite(callNewLoad[version], 6, 1, dll);
fseek(dll,CALL_FREE[version],SEEK_SET);
fseek(dll, CALL_FREE[version], SEEK_SET);
fwrite(callNewFree[version], 6, 1, dll);
fseek(dll,CALLER_LOADPLUGY,SEEK_SET);
fseek(dll, CALLER_LOADPLUGY, SEEK_SET);
fwrite(caller_LoadPlugY, sizeof(caller_LoadPlugY), 1, dll);
fseek(dll,CALLER_FREEPLUGY,SEEK_SET);
fseek(dll, CALLER_FREEPLUGY, SEEK_SET);
fwrite(caller_FreePlugY, sizeof(caller_FreePlugY), 1, dll);
fseek(dll,S_INIT,SEEK_SET);
fseek(dll, S_INIT, SEEK_SET);
fwrite(sInit, sizeof(sInit), 1, dll);
fseek(dll,S_RELEASE,SEEK_SET);
fseek(dll, S_RELEASE, SEEK_SET);
fwrite(sRelease, sizeof(sRelease), 1, dll);
fseek(dll,S_DLLNAME,SEEK_SET);
fseek(dll, S_DLLNAME, SEEK_SET);
fwrite(sDllName, sizeof(sDllName), 1, dll);
fclose(dll);
MessageBox(0,"D2gfx.dll patched successfully.\n"
"PlugY, The Survival Kit installed successfully.",
boxNameInstall, MB_OK|MB_ICONASTERISK);
MessageBox(0, "D2gfx.dll patched successfully.\n"
"PlugY, The Survival Kit installed successfully.",
boxNameInstall, MB_OK | MB_ICONASTERISK);
exit(0);
}
@@ -349,37 +285,35 @@ void Patch()
void Unpatch()
{
if (MessageBox(0,"This programm will modify the D2gfx.dll file of the current directory.\n"
"Before continue, don't forgot to backup D2gfx.dll if you want\n"
"Do you want patch D2gfx.dll for remove the launch of PlugY ?",
boxNameUnInstall, MB_YESNO|MB_ICONQUESTION) == IDNO)
if (MessageBox(0, "This programm will modify the D2gfx.dll file of the current directory.\n"
"Before continue, don't forgot to backup D2gfx.dll if you want\n"
"Do you want patch D2gfx.dll for remove the launch of PlugY ?",
boxNameUnInstall, MB_YESNO | MB_ICONQUESTION) == IDNO)
{
MessageBox(0,"D2gfx.dll isn't patched.\n",
boxNameUnInstall, MB_OK|MB_ICONASTERISK);
MessageBox(0, "D2gfx.dll isn't patched.\n",
boxNameUnInstall, MB_OK | MB_ICONASTERISK);
exit(0);
}
FILE *dll=fopen("d2gfx.dll","rb+");
FILE *dll;
if(!dll)
if (fopen_s(&dll, "d2gfx.dll", "rb+"))
{
MessageBox(0,"Can't open D2gfx.dll in read/write mode.\n"
"If Diablo II is running you can\'t install PlugY, The Survival Kit.\n"
"Quit Diablo and try again.",
boxNameUnInstall, MB_OK|MB_ICONEXCLAMATION);
MessageBox(0, "Can't open D2gfx.dll in read/write mode.\n"
"If Diablo II is running you can\'t install PlugY, The Survival Kit.\n"
"Quit Diablo II and try again.",
boxNameUnInstall, MB_OK | MB_ICONEXCLAMATION);
exit(0);
}
//int version = getVersion(dll);
int version = GetD2Ver();
int version = GetD2Version("Game.exe");
//if (version == UNKNOW)
if (version == -1)
if (version < V109 || version > V113d)
{
MessageBox(0,"Bad version of D2gfx.dll.\n"
"You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n"
"Or re-install a clean version (between 1.09 and 1.12) of LOD.",
boxNameUnInstall, MB_OK|MB_ICONEXCLAMATION);
MessageBox(0, "Bad version of D2gfx.dll.\n"
"You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n"
"Or re-install a clean version (between 1.09 and 1.13d) of LOD.",
boxNameUnInstall, MB_OK | MB_ICONEXCLAMATION);
exit(0);
}
@@ -389,99 +323,102 @@ void Unpatch()
int ident = 0;
BYTE buffer[100];
BYTE zeros[100];
memset(zeros,0,sizeof(zeros));
memset(zeros, 0, sizeof(zeros));
fseek(dll,CALL_LOAD[version],SEEK_SET);
fread(buffer,6,1,dll);
if(memcmp(buffer, callNewLoad[version], 6) !=0 ) error = true;
if(memcmp(buffer, callOldLoad[version], 6) ==0 ) ident++;
version -= V109b;
fseek(dll,CALL_FREE[version],SEEK_SET);
fread(buffer,6,1,dll);
if(memcmp(buffer, callNewFree[version], 6) !=0 ) error = true;
if(memcmp(buffer, callOldFree[version], 6) ==0 ) ident++;
fseek(dll, CALL_LOAD[version], SEEK_SET);
fread(buffer, 6, 1, dll);
if (memcmp(buffer, callNewLoad[version], 6) != 0) error = true;
if (memcmp(buffer, callOldLoad[version], 6) == 0) ident++;
fseek(dll,CALLER_LOADPLUGY,SEEK_SET);
fread(buffer,sizeof(caller_LoadPlugY),1,dll);
if(memcmp(buffer, caller_LoadPlugY, sizeof(caller_LoadPlugY)) !=0 ) error = true;
if(memcmp(buffer, zeros, sizeof(caller_LoadPlugY)) ==0 ) ident++;
fseek(dll, CALL_FREE[version], SEEK_SET);
fread(buffer, 6, 1, dll);
if (memcmp(buffer, callNewFree[version], 6) != 0) error = true;
if (memcmp(buffer, callOldFree[version], 6) == 0) ident++;
fseek(dll,CALLER_FREEPLUGY,SEEK_SET);
fread(buffer,sizeof(caller_FreePlugY),1,dll);
if(memcmp(buffer, caller_FreePlugY, sizeof(caller_FreePlugY)) !=0 ) error = true;
if(memcmp(buffer, zeros, sizeof(caller_FreePlugY)) ==0 ) ident++;
fseek(dll, CALLER_LOADPLUGY, SEEK_SET);
fread(buffer, sizeof(caller_LoadPlugY), 1, dll);
if (memcmp(buffer, caller_LoadPlugY, sizeof(caller_LoadPlugY)) != 0) error = true;
if (memcmp(buffer, zeros, sizeof(caller_LoadPlugY)) == 0) ident++;
fseek(dll,S_INIT,SEEK_SET);
fread(buffer,sizeof(sInit),1,dll);
if(memcmp(buffer, sInit, sizeof(sInit)) !=0 ) error = true;
if(memcmp(buffer, zeros, sizeof(sInit)) ==0 ) ident++;
fseek(dll, CALLER_FREEPLUGY, SEEK_SET);
fread(buffer, sizeof(caller_FreePlugY), 1, dll);
if (memcmp(buffer, caller_FreePlugY, sizeof(caller_FreePlugY)) != 0) error = true;
if (memcmp(buffer, zeros, sizeof(caller_FreePlugY)) == 0) ident++;
fseek(dll,S_RELEASE,SEEK_SET);
fread(buffer,sizeof(sRelease),1,dll);
if(memcmp(buffer, sRelease, sizeof(sRelease)) !=0 ) error = true;
if(memcmp(buffer, zeros, sizeof(sRelease)) ==0 ) ident++;
fseek(dll, S_INIT, SEEK_SET);
fread(buffer, sizeof(sInit), 1, dll);
if (memcmp(buffer, sInit, sizeof(sInit)) != 0) error = true;
if (memcmp(buffer, zeros, sizeof(sInit)) == 0) ident++;
fseek(dll,S_DLLNAME,SEEK_SET);
fread(buffer,sizeof(sDllName),1,dll);
if(memcmp(buffer, sDllName, sizeof(sDllName)) !=0 ) error = true;
if(memcmp(buffer, zeros, sizeof(sDllName)) ==0 ) ident++;
fseek(dll, S_RELEASE, SEEK_SET);
fread(buffer, sizeof(sRelease), 1, dll);
if (memcmp(buffer, sRelease, sizeof(sRelease)) != 0) error = true;
if (memcmp(buffer, zeros, sizeof(sRelease)) == 0) ident++;
fseek(dll, S_DLLNAME, SEEK_SET);
fread(buffer, sizeof(sDllName), 1, dll);
if (memcmp(buffer, sDllName, sizeof(sDllName)) != 0) error = true;
if (memcmp(buffer, zeros, sizeof(sDllName)) == 0) ident++;
if (error)
{
if (ident==7)
if (ident == 7)
{
MessageBox(0,"PlugY, The Survival Kit already uninstalled.",
boxNameUnInstall, MB_OK|MB_ICONASTERISK);
MessageBox(0, "PlugY, The Survival Kit already uninstalled.",
boxNameUnInstall, MB_OK | MB_ICONASTERISK);
exit(0);
} else {
MessageBox(0,"Bad version of D2gfx.dll.\n"
"Unable to uninstall PlugY, The Survival Kit.",
boxNameUnInstall, MB_OK|MB_ICONEXCLAMATION);
}
else
{
MessageBox(0, "Bad version of D2gfx.dll.\n"
"Unable to uninstall PlugY, The Survival Kit.",
boxNameUnInstall, MB_OK | MB_ICONEXCLAMATION);
exit(0);
}
}
fseek(dll,CALL_LOAD[version],SEEK_SET);
fseek(dll, CALL_LOAD[version], SEEK_SET);
fwrite(callOldLoad[version], 6, 1, dll);
fseek(dll,CALL_FREE[version],SEEK_SET);
fseek(dll, CALL_FREE[version], SEEK_SET);
fwrite(callOldFree[version], 6, 1, dll);
fseek(dll,CALLER_LOADPLUGY,SEEK_SET);
fseek(dll, CALLER_LOADPLUGY, SEEK_SET);
fwrite(zeros, sizeof(caller_LoadPlugY), 1, dll);
fseek(dll,CALLER_FREEPLUGY,SEEK_SET);
fseek(dll, CALLER_FREEPLUGY, SEEK_SET);
fwrite(zeros, sizeof(caller_FreePlugY), 1, dll);
fseek(dll,S_INIT,SEEK_SET);
fseek(dll, S_INIT, SEEK_SET);
fwrite(zeros, sizeof(sInit), 1, dll);
fseek(dll,S_RELEASE,SEEK_SET);
fseek(dll, S_RELEASE, SEEK_SET);
fwrite(zeros, sizeof(sRelease), 1, dll);
fseek(dll,S_DLLNAME,SEEK_SET);
fseek(dll, S_DLLNAME, SEEK_SET);
fwrite(zeros, sizeof(sDllName), 1, dll);
fclose(dll);
MessageBox(0,"D2gfx.dll patched successfully.\n"
"PlugY, The Survival Kit uninstalled successfully.",
boxNameUnInstall, MB_OK|MB_ICONASTERISK);
MessageBox(0, "D2gfx.dll patched successfully.\n"
"PlugY, The Survival Kit uninstalled successfully.",
boxNameUnInstall, MB_OK | MB_ICONASTERISK);
exit(0);
}
int main(int argc, char * argv[])
{
// if ((argc>1) && !strcmp(argv[1],"-u"))
// if ((argc>1) && !strcmp(argv[1],"-u"))
#ifdef RESTORE
Unpatch();
#else
if ((argc>1) && !strcmp(argv[1],"-u"))
if ((argc>1) && !strcmp(argv[1], "-u"))
Unpatch();
else
Patch();
#endif
return 1;
}
/*================================= END OF FILE =================================*/

View File

@@ -0,0 +1,3 @@
#pragma once
#include "resource.h"

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -1,63 +1,26 @@
// Microsoft Visual C++ generated resource script.
//Script de ressources g<>n<EFBFBD>r<EFBFBD> par Microsoft Visual C++.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
// G<EFBFBD>n<EFBFBD>r<EFBFBD> <20> partir de la ressource TEXTINCLUDE 2.
//
#include "afxres.h"
#ifndef APSTUDIO_INVOKED
#include "targetver.h"
#endif
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -67,13 +30,13 @@ LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,5,0
PRODUCTVERSION 1,0,5,0
FILEFLAGSMASK 0x17L
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
@@ -81,10 +44,13 @@ BEGIN
BEGIN
BLOCK "040c04b0"
BEGIN
VALUE "FileVersion", "1.05"
VALUE "OriginalFilename", "PlugY_Install.exe"
VALUE "ProductName", "PlugY Installation"
VALUE "ProductVersion", "1.05"
VALUE "CompanyName", "Yohann Nicolas"
VALUE "FileDescription", "PlugY patcher"
VALUE "FileVersion", "1.0.5.0"
VALUE "LegalCopyright", "Copyright (C) 2017"
VALUE "OriginalFilename", "PlugYInstall.exe"
VALUE "ProductName", "PlugY, The Survival Kit"
VALUE "ProductVersion", "11.01"
END
END
BLOCK "VarFileInfo"
@@ -94,17 +60,4 @@ BEGIN
END
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////

View File

@@ -1,6 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugYInstall", "PlugYInstall.vcproj", "{F7666190-876A-4D43-BA04-82F8F3F986DC}"

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugYInstall", "PlugYInstall.vcproj", "{66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -9,12 +10,12 @@ Global
Restore|Win32 = Restore|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F7666190-876A-4D43-BA04-82F8F3F986DC}.Debug|Win32.ActiveCfg = Release|Win32
{F7666190-876A-4D43-BA04-82F8F3F986DC}.Debug|Win32.Build.0 = Release|Win32
{F7666190-876A-4D43-BA04-82F8F3F986DC}.Release|Win32.ActiveCfg = Release|Win32
{F7666190-876A-4D43-BA04-82F8F3F986DC}.Release|Win32.Build.0 = Release|Win32
{F7666190-876A-4D43-BA04-82F8F3F986DC}.Restore|Win32.ActiveCfg = Restore|Win32
{F7666190-876A-4D43-BA04-82F8F3F986DC}.Restore|Win32.Build.0 = Restore|Win32
{66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Debug|Win32.ActiveCfg = Debug|Win32
{66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Debug|Win32.Build.0 = Debug|Win32
{66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Release|Win32.ActiveCfg = Release|Win32
{66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Release|Win32.Build.0 = Release|Win32
{66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Restore|Win32.ActiveCfg = Restore|Win32
{66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Restore|Win32.Build.0 = Restore|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Binary file not shown.

View File

@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="9,00"
Name="PlugYInstall"
ProjectGUID="{F7666190-876A-4D43-BA04-82F8F3F986DC}"
ProjectGUID="{66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}"
RootNamespace="PlugYInstall"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
@@ -17,10 +18,9 @@
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
CharacterSet="2"
>
<Tool
@@ -41,13 +41,12 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
@@ -61,11 +60,9 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/PlugYInstall.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/PlugYInstall.pdb"
SubSystem="1"
SubSystem="2"
TargetMachine="1"
/>
<Tool
@@ -86,20 +83,17 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -119,15 +113,12 @@
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OmitFramePointers="true"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
@@ -141,10 +132,9 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/PatchD2gfxDll.exe"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
@@ -167,21 +157,18 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy $(TargetPath) &quot;..\PlugYInstaller\PatchD2gfxDll.exe&quot;"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;..\PlugYInstaller\PatchD2gfxDll.exe&quot;"
/>
</Configuration>
<Configuration
Name="Restore|Win32"
OutputDirectory="$(ConfigurationName)"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -201,15 +188,12 @@
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OmitFramePointers="true"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;RESTORE"
StringPooling="true"
RuntimeLibrary="0"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;RESTORE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
@@ -223,10 +207,10 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/RestoreD2gfxDll.exe"
OutputFile="$(OutDir)\RestoreD2gfxDll.exe"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
@@ -249,12 +233,9 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy $(TargetPath) &quot;..\PlugYInstaller\RestoreD2gfxDll.exe&quot;"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;..\PlugYInstaller\RestoreD2gfxDll.exe&quot;"
/>
</Configuration>
</Configurations>
@@ -262,11 +243,12 @@
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
Name="Fichiers sources"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="PlugYInstall.cpp"
RelativePath=".\PlugYInstall.cpp"
>
</File>
<Filter
@@ -279,11 +261,20 @@
</Filter>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc"
Name="Fichiers d&apos;en-t<>te"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="resource.h"
RelativePath=".\PlugYInstall.h"
>
</File>
<File
RelativePath=".\Resource.h"
>
</File>
<File
RelativePath=".\targetver.h"
>
</File>
<Filter
@@ -296,11 +287,12 @@
</Filter>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
Name="Fichiers de ressources"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath="PlugYInstall.rc"
RelativePath=".\PlugYInstall.rc"
>
</File>
</Filter>

View File

@@ -1,93 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="8,00"
ShowAllFiles="true"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="ATHLON64"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="ATHLON64"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Restore|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="ATHLON64"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@@ -1,14 +1,25 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by PlugYInstall.rc
//
// Next default values for new objects
//
#define IDS_APP_TITLE 103
#define IDM_EXIT 105
#define IDI_PLUGYINSTALL 107
#define IDC_PLUGYINSTALL 109
#ifndef IDC_STATIC
#define IDC_STATIC -1
#endif
// Valeurs par d<>faut suivantes des nouveaux objets
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#define _APS_NO_MFC 130
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 110
#endif
#endif

24
PlugYInstall/targetver.h Normal file
View File

@@ -0,0 +1,24 @@
#pragma once
// Les macros suivantes d<>finissent la plateforme minimale requise. La plateforme minimale requise
// est la version de Windows, Internet Explorer etc. qui dispose des fonctionnalit<69>s n<>cessaires pour ex<65>cuter
// votre application. Les macros fonctionnent en activant toutes les fonctionnalit<69>s disponibles sur les versions de la plateforme jusqu'<27> la
// version sp<73>cifi<66>e.
// Modifiez les d<>finitions suivantes si vous devez cibler une plateforme avant celles sp<73>cifi<66>es ci-dessous.
// Reportez-vous <20> MSDN pour obtenir les derni<6E>res informations sur les valeurs correspondantes pour les diff<66>rentes plateformes.
#ifndef WINVER // Sp<53>cifie que la plateforme minimale requise est Windows Vista.
#define WINVER 0x0600 // Attribuez la valeur appropri<72>e <20> cet <20>l<EFBFBD>ment pour cibler d'autres versions de Windows.
#endif
#ifndef _WIN32_WINNT // Sp<53>cifie que la plateforme minimale requise est Windows Vista.
#define _WIN32_WINNT 0x0600 // Attribuez la valeur appropri<72>e <20> cet <20>l<EFBFBD>ment pour cibler d'autres versions de Windows.
#endif
#ifndef _WIN32_WINDOWS // Sp<53>cifie que la plateforme minimale requise est Windows<77>98.
#define _WIN32_WINDOWS 0x0410 // Attribuez la valeur appropri<72>e <20> cet <20>l<EFBFBD>ment pour cibler Windows<77>Me ou version ult<6C>rieure.
#endif
#ifndef _WIN32_IE // Sp<53>cifie que la plateforme minimale requise est Internet Explorer 7.0.
#define _WIN32_IE 0x0700 // Attribuez la valeur appropri<72>e <20> cet <20>l<EFBFBD>ment pour cibler d'autres versions d'Internet Explorer.
#endif