{"id":498,"date":"2008-05-08T05:03:09","date_gmt":"2008-05-08T05:03:09","guid":{"rendered":"http:\/\/6teen.ru\/?p=338"},"modified":"2008-05-08T05:03:09","modified_gmt":"2008-05-08T05:03:09","slug":"10066","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=498","title":{"rendered":"\u041a\u0430\u043a \u043e\u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043c\u0430 \u043f\u043e\u0434 Win"},"content":{"rendered":"<p>\u041a\u0430\u043a \u043e\u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043c\u0430 \u043f\u043e\u0434 Win<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 \u043e\u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043c\u0430 \u043f\u043e\u0434 Win\n\nprocedure TForm1.Button1Click(Sender: TObject);\nvar\nCommPort : string;\nhCommFile : THandle;\nModemStat : DWord;\nbegin\nCommPort := 'COM2';\n{Open the comm port}\nhCommFile := CreateFile(PChar(CommPort),\nGENERIC_READ,\n0,\nnil,\nOPEN_EXISTING,\nFILE_ATTRIBUTE_NORMAL,\n0);\nif hCommFile = INVALID_HANDLE_VALUE then\nbegin\nShowMessage('Unable to open '+ CommPort);\nexit;\nend;\n{Get the Modem Status}\nif GetCommModemStatus(hCommFile, ModemStat) > false then begin\nif ModemStat and MS_CTS_ON > 0 then\nShowMessage('The CTS (clear-to-send) is on.');\nif ModemStat and MS_DSR_ON!\n> 0 then\nShowMessage('The DSR (data-set-ready) is on.');\nif ModemStat and MS_RING_ON > 0then\nShowMessage('The ring indicator is on.');\nif ModemStat and MS_RLSD_ON > 0 then\nShowMessage('The RLSD (receive-line-signal-detect) is\non.');\nend;\n{Close the comm port}\nCloseHandle(hCommFile);\nend;\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u043e\u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043c\u0430 \u043f\u043e\u0434 Win<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[433,451],"tags":[170,1441,1505],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/498"}],"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=498"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/498\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=498"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}