Working on 64 bit cw
This commit is contained in:
parent
5722ea4622
commit
710a699df9
|
@ -26,7 +26,7 @@ bool Process::InjectDLL(string dllName) {
|
|||
}
|
||||
bool Process::Create() {
|
||||
return CreateProcess(NULL,
|
||||
"Cube.exe",
|
||||
(char*)path.c_str(),
|
||||
NULL,
|
||||
NULL,
|
||||
true,
|
||||
|
|
|
@ -57,12 +57,18 @@ unsigned int crc32_buf(const char* buf, unsigned long len)
|
|||
|
||||
unsigned int crc32_file(const char* fileName){
|
||||
FILE* file = fopen(fileName, "rb");
|
||||
|
||||
fseek(file, 0, SEEK_END);
|
||||
int fileSize = ftell(file);
|
||||
char* fileContents = new char[fileSize];
|
||||
char* fileContents = new char[fileSize+1];
|
||||
|
||||
fseek(file, 0, SEEK_SET);
|
||||
fread(fileContents, 1, fileSize, file);
|
||||
fclose(file);
|
||||
|
||||
int result = crc32_buf(fileContents, fileSize);
|
||||
|
||||
delete[] fileContents;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "crc.h"
|
||||
|
||||
#define CUBE_VERSION "1.0.0-0"
|
||||
#define CUBE_CRC 0x00000000
|
||||
#define CUBE_CRC 0x6AFF99F7
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -38,13 +38,14 @@ int main()
|
|||
}
|
||||
|
||||
//The callback manager is required.
|
||||
if ( !FileExists("CallbackManager.dll") ){
|
||||
/*if ( !FileExists("CallbackManager.dll") ){
|
||||
printf("Callback manager not found.\n");
|
||||
Sleep(1000);
|
||||
return 1;
|
||||
}
|
||||
|
||||
modDLLs.push_back( std::string("CallbackManager.dll") );
|
||||
*/
|
||||
|
||||
Process process("Cube.exe");
|
||||
|
||||
|
|
Loading…
Reference in New Issue