{"action":"closed","issue":{"url":"https://api.github.com/repos/EasyHook/EasyHook/issues/255","repository_url":"https://api.github.com/repos/EasyHook/EasyHook","labels_url":"https://api.github.com/repos/EasyHook/EasyHook/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/EasyHook/EasyHook/issues/255/comments","events_url":"https://api.github.com/repos/EasyHook/EasyHook/issues/255/events","html_url":"https://github.com/EasyHook/EasyHook/issues/255","id":354078571,"node_id":"MDU6SXNzdWUzNTQwNzg1NzE=","number":255,"title":"hook customized com failure","user":{"login":"suncodeer","id":31609068,"node_id":"MDQ6VXNlcjMxNjA5MDY4","avatar_url":"https://avatars0.githubusercontent.com/u/31609068?v=4","gravatar_id":"","url":"https://api.github.com/users/suncodeer","html_url":"https://github.com/suncodeer","followers_url":"https://api.github.com/users/suncodeer/followers","following_url":"https://api.github.com/users/suncodeer/following{/other_user}","gists_url":"https://api.github.com/users/suncodeer/gists{/gist_id}","starred_url":"https://api.github.com/users/suncodeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suncodeer/subscriptions","organizations_url":"https://api.github.com/users/suncodeer/orgs","repos_url":"https://api.github.com/users/suncodeer/repos","events_url":"https://api.github.com/users/suncodeer/events{/privacy}","received_events_url":"https://api.github.com/users/suncodeer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-26T08:56:47Z","updated_at":"2018-08-27T03:50:55Z","closed_at":"2018-08-27T03:50:55Z","author_association":"NONE","body":"I create one COM with 2013 ATL.\r\nIt is remote hook. One customized activex is placed on the IE.\r\nBut it doesn't to come into my delegate method.\r\nAnd I get correct Class ID &Interface ID.\r\n[\r\n\tobject,\r\n\tuuid(D78CF79C-D15C-42EA-85C2-882951F1A9EB),\r\n\tdual,\r\n\tnonextensible,\r\n\tpointer_default(unique)\r\n]\r\ninterface ICalc : IDispatch\r\nlibrary ATLToBeHookedV5Lib\r\n{\r\n\timportlib(\"stdole2.tlb\");\r\n\t[\r\n\t\tuuid(B31DFAAC-B524-40A1-A72A-0999FF394EFD),\t\t\r\n\t\tcontrol\r\n\t]\r\nThen I initialize this com with easyhook.\r\nEasyHook.COMClassInfo cci1 = new EasyHook.COMClassInfo(new Guid(\"B31DFAAC-B524-40A1-A72A-0999FF394EFD\"), new Guid(\"D78CF79C-D15C-42EA-85C2-882951F1A9EB\"), 3);\r\nThere is only one method in interface \r\ninterface ICalc : IDispatch{\r\n\t[id(1)] HRESULT add2([in] LONG var1, [in] LONG var2, [out, retval] LONG* var3);\r\n};\r\nThen add hook method\r\n            var addHook = EasyHook.LocalHook.Create(\r\n                    cci1.MethodPointers[0],\r\n                    new AddDelegate(AddHooked),\r\n                    null\r\n            );\r\n        #region add2\r\n        [UnmanagedFunctionPointer(CallingConvention.StdCall, CharSet = CharSet.Unicode, SetLastError = false)]\r\n        public delegate IntPtr AddDelegate(Int32 var1, Int32 var2, out IntPtr var3);\r\n\r\n        private static IntPtr AddHooked(Int32 var1, Int32 var2, out IntPtr var3)\r\n        {\r\n            MessageBox(0, \"Hello, PInvoke.NET\", \"PInvokeLab\", 0);\r\n            var3 = (System.IntPtr)var2;\r\n\r\n            return var3;\r\n        }\r\n        #endregion\r\n        #region recv"}}
{"actor":{"display_login":"suncodeer"}}