Try running it in VS debugger, and find the point where it freezes. Seems like its local.
Try running it in VS debugger, and find the point where it freezes. Seems like its local.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
I was under the impression that this was a game you were making. In that case, idk, it really depends exactly what the code does. Something about what ur .dll does is causing adverse effects in the game. Just make sure you don't have any loose ends. =/
It could be a combination of your .dll and the game causing the loop.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
With my current code (see below) the hook(detour) works the first time(just like before) and then the process seems to continue but if I try to close the process it stops responding.
I ran the program with IDA pro injected the dll and then went through the steps to make that hook run when it did IDA said it caused an unknown exception.
Current code(basically the same thing but for a different address point):
btw the assembly of "0x004B8ABF" is just NOP im not sure if that is an issue if it is can someone explain an easier way to run my function when the program reaches that address point?Code:#include <windows.h> #include "detours.h" #include <iostream> #include <fstream> using namespace std; int (__stdcall* DemoBugFixPoint)(void); int __stdcall DemoBugFixPoint(void) { ofstream myfile; myfile.open ("legends.log"); myfile << "SetRights(demo bug fix) applied to new logon.\n"; myfile.close(); return DemoBugFixPointHook(); } BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: DemoBugFixPointHook = (int (__stdcall*)(void))DetourFunction((PBYTE)0x004B8ABF, (PBYTE)DemoBugFixPoint); break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: DetourRemove((PBYTE)0x004B8ABF, (PBYTE)DemoBugFixPointHook); //Remove hook break; } return TRUE; }