{"id":656,"date":"2008-05-19T08:16:21","date_gmt":"2008-05-19T08:16:21","guid":{"rendered":"http:\/\/6teen.ru\/?p=326"},"modified":"2008-05-19T08:16:21","modified_gmt":"2008-05-19T08:16:21","slug":"1990","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=656","title":{"rendered":"\u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u044c\u044e\u0442\u0435\u0440\u044b \u0432 \u0441\u0435\u0442\u0438 2"},"content":{"rendered":"<p>\u041a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u043a\u043e\u043c\u044c\u044e\u0442\u0435\u0440\u044b \u0432 \u0441\u0435\u0442\u0438 2<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\u044c\u044e\u0442\u0435\u0440\u044b \u0432 \u0441\u0435\u0442\u0438 2\n\n\u0410\u0432\u0442\u043e\u0440: Pegas\nWEB-\u0441\u0430\u0439\u0442: http:\/\/forum.vingrad.ru\n\nfunction TNetForm.FillNetLevel(xxx: PNetResource; List: TListItems): Word;\ntype\n  PNRArr = ^TNRArr;\n  TNRArr = array[0..59] of TNetResource;\nvar\n  x: PNRArr;\n  tnr: TNetResource;\n  I: integer;\n  EntrReq,\n    SizeReq,\n    twx: THandle;\n  WSName: string;\n  LI: TListItem;\nbegin\n  Result := WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY,\n    RESOURCEUSAGE_CONTAINER, xxx, twx);\n  if Result = ERROR_NO_NETWORK then\n    Exit;\n  if Result = NO_ERROR then\n  begin\n    New(x);\n    EntrReq := 1;\n    SizeReq := SizeOf(TNetResource) * 59;\n    while (twx <> 0) and\n      (WNetEnumResource(twx, EntrReq, x, SizeReq) <> ERROR_NO_MORE_ITEMS) do\n    begin\n      for i := 0 to EntrReq - 1 do\n      begin\n        Move(x^[i], tnr, SizeOf(tnr));\n        case tnr.dwDisplayType of\n          RESOURCEDISPLAYTYPE_SERVER:\n            begin\n              if tnr.lpRemoteName <> '' then\n                WSName := tnr.lpRemoteName\n              else\n                WSName := tnr.lpComment;\n              LI := list.Add;\n              LI.Caption := copy(WSName, 3, length(WSName) - 2);\n              \/\/list.Add(WSName);\n            end;\n        else\n          FillNetLevel(@tnr, list);\n        end;\n      end;\n    end;\n    Dispose(x);\n    WNetCloseEnum(twx);\n  end;\nend;\n\n\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0437\u043e\u0432\u0430:\nFillNetLevel(nil, ListView1.Items);\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\u044c\u044e\u0442\u0435\u0440\u044b \u0432 \u0441\u0435\u0442\u0438 2<\/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":[1389,1462,1716],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/656"}],"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=656"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/656\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=656"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}