{"action":"created","issue":{"url":"https://api.github.com/repos/stevemk14ebr/PolyHook/issues/2","labels_url":"https://api.github.com/repos/stevemk14ebr/PolyHook/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/stevemk14ebr/PolyHook/issues/2/comments","events_url":"https://api.github.com/repos/stevemk14ebr/PolyHook/issues/2/events","html_url":"https://github.com/stevemk14ebr/PolyHook/issues/2","id":122637947,"number":2,"title":"VEHHook only work 1 time why is that?","user":{"login":"Dj-jom2x","id":12135498,"avatar_url":"https://avatars.githubusercontent.com/u/12135498?v=3","gravatar_id":"","url":"https://api.github.com/users/Dj-jom2x","html_url":"https://github.com/Dj-jom2x","followers_url":"https://api.github.com/users/Dj-jom2x/followers","following_url":"https://api.github.com/users/Dj-jom2x/following{/other_user}","gists_url":"https://api.github.com/users/Dj-jom2x/gists{/gist_id}","starred_url":"https://api.github.com/users/Dj-jom2x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dj-jom2x/subscriptions","organizations_url":"https://api.github.com/users/Dj-jom2x/orgs","repos_url":"https://api.github.com/users/Dj-jom2x/repos","events_url":"https://api.github.com/users/Dj-jom2x/events{/privacy}","received_events_url":"https://api.github.com/users/Dj-jom2x/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-17T00:53:29Z","updated_at":"2015-12-17T12:15:01Z","closed_at":null,"body":"why do i need to loop the ->hook to update the screen :(  .. in d3d good hook i use VEHHook i dont need to loop because its permanent;\r\nnow i try to use it on different lvl like \r\n\r\n\tVEHHook = new PLH::VEHHook;\r\n\t\tVEHHook->SetupHook((BYTE*)WriteServerConsole, (BYTE*)&hWriteServerConsole);\r\n\t\tVEHHook->Hook();\r\n\t\toWriteServerConsole = VEHHook->GetOriginal<tWriteServerConsole>();\r\n\r\n\r\nserver response but you need to make thread\r\n\r\n\tCreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)OverwriteValues, NULL, NULL, NULL );\t\r\n\r\nand do this for \r\n\r\n\r\nDWORD WINAPI OverwriteValues()\r\n{\r\n\r\n\tfor (;;Sleep(150))\r\n\t{\r\n\t\t\r\n\t\tVEHHook->Hook();\r\n\t}\r\n}\r\n\r\nhow to make this permanent hook :(  do i really need this \"for (;;Sleep(150))\" or there's something i dint know ? \r\n\r\n\r\nDLL Console Debug Purpose\r\nEngine Started\r\n[SERVER] @ - Call CGameGuardMgr::CGameGuardMgr(): Before\r\n[SERVER] @ - Call CTextInfoMgr::GetText_FromMiscMsgW() -> szName = %s\r\n[SERVER] @ - Version = %s\r\netc ...........\r\n\r\n[SERVER] @ - Call NetComponent_CreateGameStage< %s >::OnEvent"},"comment":{"url":"https://api.github.com/repos/stevemk14ebr/PolyHook/issues/comments/165437672","html_url":"https://github.com/stevemk14ebr/PolyHook/issues/2#issuecomment-165437672","issue_url":"https://api.github.com/repos/stevemk14ebr/PolyHook/issues/2","id":165437672,"user":{"login":"Dj-jom2x","id":12135498,"avatar_url":"https://avatars.githubusercontent.com/u/12135498?v=3","gravatar_id":"","url":"https://api.github.com/users/Dj-jom2x","html_url":"https://github.com/Dj-jom2x","followers_url":"https://api.github.com/users/Dj-jom2x/followers","following_url":"https://api.github.com/users/Dj-jom2x/following{/other_user}","gists_url":"https://api.github.com/users/Dj-jom2x/gists{/gist_id}","starred_url":"https://api.github.com/users/Dj-jom2x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dj-jom2x/subscriptions","organizations_url":"https://api.github.com/users/Dj-jom2x/orgs","repos_url":"https://api.github.com/users/Dj-jom2x/repos","events_url":"https://api.github.com/users/Dj-jom2x/events{/privacy}","received_events_url":"https://api.github.com/users/Dj-jom2x/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T12:15:01Z","updated_at":"2015-12-17T12:15:01Z","body":"cool it works xD omg you are great xD  http://postimg.org/image/e6c716v6n/ hahaha <3 for some reason when i called the original function it crash .. i use ida 6.8 to check the return type and params .. so insted calling back i always \"return 1\" because the return type is int .. and I re create the function by analyzing Ida 6.8 structures xD ...\r\n\r\nlast question\r\n is this the proper way? to use offset one .. I use detour 3.0 before that's why i come up with this \r\n\r\nmine is\r\n\r\n int(__cdecl* ServerConsole)(char, char*,  ...) = ( int(__cdecl*)(char,  char*,  ...)) ((DWORD)address);\r\n\r\n typedef int(__cdecl* tWriteServerConsole)(char, char*, ...) ;\r\ntWriteServerConsole oWriteServerConsole;\r\n\r\n\r\nfunction some where\r\nint ServerConsole2(char a,char *b, ...);\r\n\r\ndll main somewhere ...\r\n\t        VEHHook->SetupHook((BYTE*)ServerConsole, (BYTE*)&ServerConsole2);\r\n\t\tVEHHook->Hook();\r\n\t\toWriteServerConsole = VEHHook->GetOriginal<tWriteServerConsole>();\r\n\r\n\r\ni should return like this right oWriteServerConsole(a,b) ? rather than recreating for future purpose."}}