{"id":766,"date":"2008-05-26T08:08:10","date_gmt":"2008-05-26T08:08:10","guid":{"rendered":"http:\/\/6teen.ru\/?p=324"},"modified":"2008-05-26T08:08:10","modified_gmt":"2008-05-26T08:08:10","slug":"8498","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=766","title":{"rendered":"\u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u0435"},"content":{"rendered":"<p>\u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u0435<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 \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u0435\n\nvar\n  Computer: array [1..500] of string[25];\n  ComputerCount: Integer;\n\nprocedure FindAllComputers(Workgroup: string);\nvar\n  EnumHandle: THandle;\n  WorkgroupRS: TNetResource;\n  Buf: array [1..500] of TNetResource;\n  BufSize: Integer;\n  Entries: Integer;\n  Result: Integer;\nbegin\n  ComputerCount := 0;\n  Workgroup := Workgroup + #0;\n  FillChar(WorkgroupRS, SizeOf(WorkgroupRS) , 0);\n  with WorkgroupRS do\n  begin\n    dwScope := 2;\n    dwType := 3;\n    dwDisplayType := 1;\n    dwUsage := 2;\n    lpRemoteName := @Workgroup[1];\n  end;\n\n  WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, 0, @WorkgroupRS, EnumHandle);\n\n  repeat\n    Entries := 1;\n    BufSize := SizeOf(Buf);\n\n    Result := WNetEnumResource(EnumHandle, Entries, @Buf, BufSize);\n    if (Result = NO_ERROR) and (Entries = 1) then\n    begin\n      Inc( ComputerCount );\n      Computer[ ComputerCount ] := StrPas(Buf[1].lpRemoteName);\n    end;\n  until\n    (Entries <> 1) or (Result <> NO_ERROR);\n\n  WNetCloseEnum( EnumHandle );\nend;\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u0435<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[448,457],"tags":[1282,1388,1462,1660],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/766"}],"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=766"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/766\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=766"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}