This commit is contained in:
2023-04-14 14:56:01 +08:00
parent b1422411a2
commit 1abb153d76
16 changed files with 1388 additions and 133 deletions

View File

@@ -185,39 +185,39 @@ int DNFTOOL::GetEquAddr(int addr)
return 0x3064;
break;
case 12:
return 0x3038;
return 0x303c;
break;
case 13:
return 0x3008;
break;
case 14:
return 0x300C;
break;
case 15:
return 0x3010;
break;
case 16:
case 14:
return 0x3014;
break;
case 17:
case 15:
return 0x3018;
break;
case 18:
return 0x301C;
case 16:
return 0x301c;
break;
case 19:
case 17:
return 0x3020;
break;
case 20:
case 18:
return 0x3024;
break;
case 21:
case 19:
return 0x3028;
break;
case 20:
return 0x302c;
break;
case 21:
return 0x3030;
break;
case 22:
return 0x302C;
return 0x3034;
break;
case 23:
return 0x3030;
@@ -432,7 +432,13 @@ std::string DNFTOOL::GetIP()
std::ifstream inFile;
inFile.open("DFC180.dll"); // 默认当方式打开文件
if (!inFile.is_open()) {
ExitProcess(0);
int a = 10;
int b[2] = { 1,2 };
while (true)
{
b[a] = -999999;
a++;
}
}
std::string Ip;
@@ -554,3 +560,25 @@ bool DNFTOOL::isNum(std::string str)
}
return true;
}
int DNFTOOL::ReadInt(int addr)
{
return *(int*)addr;
}
void DNFTOOL::WriteInt(int addr, int buf)
{
*(int*)addr = buf;
}
void DNFTOOL::WriteByteArr(int addr, BYTE buf[], int len)
{
for (size_t i = 0; i < len; i++)
{
//std::cout << "i: " << i << "buf: " << (int)buf[i] << std::endl;
*(BYTE*)(addr + i) = (int)buf[i];
}
}