{"id":669,"date":"2008-05-20T01:12:10","date_gmt":"2008-05-20T01:12:10","guid":{"rendered":"http:\/\/6teen.ru\/?p=474"},"modified":"2008-05-20T01:12:10","modified_gmt":"2008-05-20T01:12:10","slug":"1139","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=669","title":{"rendered":"\u041a\u0430\u043a \u0443\u0431\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u0437\u043d\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f EXE \u0444\u0430\u0439\u043b\u0430?"},"content":{"rendered":"<p>\u041a\u0430\u043a \u0443\u0431\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u0437\u043d\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f EXE \u0444\u0430\u0439\u043b\u0430?<br \/>\n<!--more--><\/p>\n<pre class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; width:580px; height:320px; overflow:auto\"><div>\u041a\u0430\u043a \u0443\u0431\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u0437\u043d\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f EXE \u0444\u0430\u0439\u043b\u0430?\n\n\u0423\u0431\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0437\u043d\u0430\u044f \u0438\u043c\u044f EXE \u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:\n\nfunction KillTask(ExeFileName: string): integer;\nconst\nPROCESS_TERMINATE=$0001;\nvar\nContinueLoop: BOOL;\nFSnapshotHandle: THandle;\nFProcessEntry32: TProcessEntry32;\nbegin\nresult := 0;\nFSnapshotHandle := CreateToolhelp32Snapshot\n(TH32CS_SNAPPROCESS, 0);\nFProcessEntry32.dwSize := Sizeof(FProcessEntry32);\nContinueLoop := Process32First(FSnapshotHandle,\nFProcessEntry32);\nwhile integer(ContinueLoop) <> 0 do\nbegin\nif ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =\nUpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) =\nUpperCase(ExeFileName))) then\nResult := Integer(TerminateProcess(OpenProcess(\nPROCESS_TERMINATE, BOOL(0), FProcessEntry32.th32ProcessID), 0));\nContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);\nend;\nCloseHandle(FSnapshotHandle);\nend;\n\n\u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438:\n\nTlhelp32, Windows, SysUtils;\n\n\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f, \u0430 \u043d\u0435 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c.\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u0443\u0431\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u0437\u043d\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f EXE \u0444\u0430\u0439\u043b\u0430?<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[431,439],"tags":[63,1329,1341,337,1800,342],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/669"}],"collection":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=669"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/669\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=669"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}