Resolve warnings
This commit is contained in:
parent
098fd15371
commit
0fffc7dd57
|
@ -20,7 +20,7 @@ bool Process::InjectDLL(string dllName) {
|
|||
LPVOID load_library = (LPVOID) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "LoadLibraryA");
|
||||
LPVOID remote_string = (LPVOID) VirtualAllocEx(pi.hProcess, NULL, strlen(dllName.c_str()) + 1, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
|
||||
WriteProcessMemory(pi.hProcess, remote_string, dllName.c_str(), strlen(dllName.c_str()) + 1, NULL);
|
||||
HANDLE thread = CreateRemoteThread(pi.hProcess, NULL, NULL, (LPTHREAD_START_ROUTINE) load_library, remote_string, CREATE_SUSPENDED, NULL);
|
||||
HANDLE thread = CreateRemoteThread(pi.hProcess, NULL, 0, (LPTHREAD_START_ROUTINE) load_library, remote_string, CREATE_SUSPENDED, NULL);
|
||||
ResumeThread(thread);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#define MODLOADER_CRC 0x39D18E98
|
||||
|
||||
#define CUBE_EXECUTABLE "cubeworld.exe"
|
||||
const char* CUBE_EXECUTABLE = "cubeworld.exe";
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -31,6 +31,9 @@ int main(int argc, char** argv) {
|
|||
if (argc >= 2 && !strcmp(argv[1], "test")) {
|
||||
testMode = true;
|
||||
printf("Test mode enabled. CRC checks will be bypassed.\n");
|
||||
if (argc >= 3) {
|
||||
CUBE_EXECUTABLE = argv[2];
|
||||
}
|
||||
}
|
||||
|
||||
//Cube world is obviously required
|
||||
|
|
|
@ -9,7 +9,7 @@ DLL::DLL(std::string fileName) {
|
|||
HMODULE DLL::Load() {
|
||||
this->handle = LoadLibraryA(this->fileName.c_str());
|
||||
if (!this->handle) {
|
||||
printf("Could not load %s: %d\n", this->fileName.c_str(), GetLastError());
|
||||
printf("Could not load %s: %ld\n", this->fileName.c_str(), GetLastError());
|
||||
exit(1);
|
||||
}
|
||||
return this->handle;
|
||||
|
|
|
@ -57,7 +57,7 @@ void SetupHandlers() {
|
|||
SetupP2PRequestHandler();
|
||||
}
|
||||
|
||||
void Popup(char* title, char* msg ){
|
||||
void Popup(const char* title, char* msg ){
|
||||
MessageBoxA(0, msg, title, MB_OK | MB_ICONINFORMATION);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue