{"action":"opened","issue":{"url":"https://api.github.com/repos/EasyHook/EasyHook/issues/47","labels_url":"https://api.github.com/repos/EasyHook/EasyHook/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/EasyHook/EasyHook/issues/47/comments","events_url":"https://api.github.com/repos/EasyHook/EasyHook/issues/47/events","html_url":"https://github.com/EasyHook/EasyHook/issues/47","id":109553494,"number":47,"title":"LocalHook.Create throwing AccessViolationException ","user":{"login":"arshrp","id":14945576,"avatar_url":"https://avatars.githubusercontent.com/u/14945576?v=3","gravatar_id":"","url":"https://api.github.com/users/arshrp","html_url":"https://github.com/arshrp","followers_url":"https://api.github.com/users/arshrp/followers","following_url":"https://api.github.com/users/arshrp/following{/other_user}","gists_url":"https://api.github.com/users/arshrp/gists{/gist_id}","starred_url":"https://api.github.com/users/arshrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arshrp/subscriptions","organizations_url":"https://api.github.com/users/arshrp/orgs","repos_url":"https://api.github.com/users/arshrp/repos","events_url":"https://api.github.com/users/arshrp/events{/privacy}","received_events_url":"https://api.github.com/users/arshrp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-02T19:06:50Z","updated_at":"2015-10-02T19:06:50Z","closed_at":null,"body":"Hi EasyHookers,\r\n\r\nYour product is working wonderfully for us in most situations.  But we are experience an issue on  Windows 2008 Terminal Services machine.  The call to GetProcAddress is throwing this exception:\r\n\r\nSystem.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.\r\n   at EasyHook.LocalHook.Create(IntPtr InTargetProc, Delegate InNewProc, Object InCallback)\r\n\r\nYour documentation clearly states that this exception will be thrown when \"Access to target process denied or the current user is not an administrator\", but we are running our application as an administrator (using the \"Run as administrator\" File Manager menu option), so it should have the necessary permissions.  \r\n\r\nBelow is a summary of the code we are using.  Are we doing anything wrong that might cause this error?  ANY suggestions at all that you can provide would be most appreciated!\r\n\r\nAndrew\r\n\r\n\r\npublic class Injector : EasyHook.IEntryPoint {\r\n\r\npublic void InstallHook(NxKitInterface iface) {\r\n    LocalHook.Create(\r\n        LocalHook.GetProcAddress(\"Gdi32.dll\", \"ExtTextOutW\"), \r\n        new DExtTextOutW(ExtTextOutW_Hooked),\r\n        this\r\n    );\r\n}\r\n\r\nstatic bool ExtTextOutW_Hooked(IntPtr hdc, int X, int Y, uint fuOptions, IntPtr lprc, IntPtr lpString, uint cbCount, IntPtr lpDx) {\r\n}\r\n\r\n}"}}