{"action":"created","issue":{"url":"https://api.github.com/repos/martona/mhook/issues/11","repository_url":"https://api.github.com/repos/martona/mhook","labels_url":"https://api.github.com/repos/martona/mhook/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/martona/mhook/issues/11/comments","events_url":"https://api.github.com/repos/martona/mhook/issues/11/events","html_url":"https://github.com/martona/mhook/issues/11","id":87283250,"number":11,"title":"Hook OpenPrinterW failed under X64 platform ","user":{"login":"lhg19202212","id":12842904,"avatar_url":"https://avatars.githubusercontent.com/u/12842904?v=3","gravatar_id":"","url":"https://api.github.com/users/lhg19202212","html_url":"https://github.com/lhg19202212","followers_url":"https://api.github.com/users/lhg19202212/followers","following_url":"https://api.github.com/users/lhg19202212/following{/other_user}","gists_url":"https://api.github.com/users/lhg19202212/gists{/gist_id}","starred_url":"https://api.github.com/users/lhg19202212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhg19202212/subscriptions","organizations_url":"https://api.github.com/users/lhg19202212/orgs","repos_url":"https://api.github.com/users/lhg19202212/repos","events_url":"https://api.github.com/users/lhg19202212/events{/privacy}","received_events_url":"https://api.github.com/users/lhg19202212/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-11T09:44:15Z","updated_at":"2016-02-07T13:00:59Z","closed_at":null,"body":"Error message:  ANOMALY: use of REX.w is meaningless (default operand size is 64).\r\nMy Test Code:\r\ntypedef BOOL  (WINAPI* PFNOPENPRINTERW)(\r\n\t\t\t\t\t\t\t\t\t\tLPWSTR             pPrinterName,\r\n\t\t\t\t\t\t\t\t\t\t LPHANDLE            phPrinter,\r\n\t\t\t\t\t\t\t\t\t\tLPPRINTER_DEFAULTSW pDefault\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\nPFNOPENPRINTERW fpOpenPrinterW=(PFNOPENPRINTERW)GetProcAddress(LoadLibraryW(L\"winspool.drv\"), \"OpenPrinterW\");\r\n\r\nBOOL\r\nWINAPI\r\nMyOpenPrinterW(\r\n\t\t\t   LPWSTR    pPrinterName,\r\n\t\t\t   LPHANDLE  phPrinter,\r\n\t\t\t   LPPRINTER_DEFAULTSW pDefault)\r\n\t\t\t   \r\n{\r\n       BOOL Status;\r\n\tchar temp[MAX_PATH]={0x00};\r\n\tGetModuleFileNameA(NULL,temp,MAX_PATH);\r\n\tprintf(\"%s[%d] m_sProcessName=%s \\n\",__FILE__,__LINE__,temp);\r\n       Status = fpOpenPrinterW (pPrinterName, phPrinter, pDefault);   \r\n    return Status;\r\n}\r\n\r\nint wmain(int argc, WCHAR* argv[])\r\n{\r\n\tHANDLE hProc = NULL;\r\n\tHANDLE m_handle=NULL;\r\n\tif(Mhook_SetHook((PVOID*)&fpOpenPrinterW, MyOpenPrinterW))\r\n\t{\r\n\t\tOpenPrinterW(L\"\\Brother MFC-7860DN Printer\",&m_handle,NULL);\r\n\t\tif(m_handle)\r\n\t\t\tCloseHandle(m_handle);\t\r\n\t\tMhook_Unhook((PVOID*)&fpOpenPrinterW);\r\n\t}else{\r\n\t\tprintf(\"%s[%d].OpenPrinterW hook fail\\n\",__FILE__,__LINE__);\r\n\t}\t\t\r\n\treturn 0;\r\n}"},"comment":{"url":"https://api.github.com/repos/martona/mhook/issues/comments/181010668","html_url":"https://github.com/martona/mhook/issues/11#issuecomment-181010668","issue_url":"https://api.github.com/repos/martona/mhook/issues/11","id":181010668,"user":{"login":"poizan42","id":308129,"avatar_url":"https://avatars.githubusercontent.com/u/308129?v=3","gravatar_id":"","url":"https://api.github.com/users/poizan42","html_url":"https://github.com/poizan42","followers_url":"https://api.github.com/users/poizan42/followers","following_url":"https://api.github.com/users/poizan42/following{/other_user}","gists_url":"https://api.github.com/users/poizan42/gists{/gist_id}","starred_url":"https://api.github.com/users/poizan42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poizan42/subscriptions","organizations_url":"https://api.github.com/users/poizan42/orgs","repos_url":"https://api.github.com/users/poizan42/repos","events_url":"https://api.github.com/users/poizan42/events{/privacy}","received_events_url":"https://api.github.com/users/poizan42/received_events","type":"User","site_admin":false},"created_at":"2016-02-07T13:00:59Z","updated_at":"2016-02-07T13:00:59Z","body":"I cannot reproduce this. Which version of winspool.drv do you have?"}}