{"id":559,"date":"2008-05-13T14:11:09","date_gmt":"2008-05-13T14:11:09","guid":{"rendered":"http:\/\/6teen.ru\/?p=603"},"modified":"2008-05-13T14:11:09","modified_gmt":"2008-05-13T14:11:09","slug":"6195","status":"publish","type":"post","link":"http:\/\/pblog.ru\/lab\/?p=559","title":{"rendered":"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u044f\u0440\u043b\u044b\u043a\u0435"},"content":{"rendered":"<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u044f\u0440\u043b\u044b\u043a\u0435<br \/>\n<!--more--><\/p>\n<pre class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset; width:580px; height:320px; overflow:auto\"><div>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u044f\u0440\u043b\u044b\u043a\u0435\n\nshlobj,\ncomobj,\nactivex,\ncommctrl;\n\ntype\npshelllinkinfostruct = ^tshelllinkinfostruct;\ntshelllinkinfostruct = record\nfullpathandnameoflinkfile: array[0..max_path] of char;\nfullpathandnameoffiletoexecute: array[0..max_path] of char;\nparamstringsoffiletoexecute: array[0..max_path] of char;\nfullpathandnameofworkingdirectroy: array[0..max_path] of char;\ndescription: array[0..max_path] of char;\nfullpathandnameoffilecontiningicon: array[0..max_path] of char;\niconindex: integer;\nhotkey: word;\nshowcommand: integer;\nfinddata: twin32finddata;\nend;\n\nprocedure getlinkinfo(lpshelllinkinfostruct: pshelllinkinfostruct);\nvar\nshelllink: ishelllink;\npersistfile: ipersistfile;\nanobj: iunknown;\nbegin\n\/\/ access to the two interfaces of the object\nanobj := createcomobject(clsid_shelllink);\nshelllink := anobj as ishelllink;\npersistfile := anobj as ipersistfile;\n\n\/\/ opens the specified file and initializes an object from the file contents.\npersistfile.load(pwchar(widestring(lpshelllinkinfostruct^.fullpathandnameoflinkfile)), 0);\nwith shelllink do\nbegin\n\/\/ retrieves the path and file name of a shell link object.\ngetpath(lpshelllinkinfostruct^.fullpathandnameoffiletoexecute,\nsizeof(lpshelllinkinfostruct^.fullpathandnameoflinkfile),\nlpshelllinkinfostruct^.finddata,\nslgp_uncpriority);\n\n\/\/ retrieves the description string for a shell link object.\ngetdescription(lpshelllinkinfostruct^.description,\nsizeof(lpshelllinkinfostruct^.description));\n\n\/\/ retrieves the command-line arguments associated with a shell link object.\ngetarguments(lpshelllinkinfostruct^.paramstringsoffiletoexecute,\nsizeof(lpshelllinkinfostruct^.paramstringsoffiletoexecute));\n\n\/\/ retrieves the name of the working directory for a shell link object.\ngetworkingdirectory(lpshelllinkinfostruct^.fullpathandnameofworkingdirectroy,\nsizeof(lpshelllinkinfostruct^.fullpathandnameofworkingdirectroy));\n\n\/\/ retrieves the location (path and index) of the icon for a shell link object.\ngeticonlocation(lpshelllinkinfostruct^.fullpathandnameoffilecontiningicon,\nsizeof(lpshelllinkinfostruct^.fullpathandnameoffilecontiningicon),\nlpshelllinkinfostruct^.iconindex);\n\n\/\/ retrieves the hot key for a shell link object.\ngethotkey(lpshelllinkinfostruct^.hotkey);\n\n\/\/ retrieves the show (sw_) command for a shell link object.\ngetshowcmd(lpshelllinkinfostruct^.showcommand);\nend;\nend;\n\nprocedure tform1.button1click(sender: tobject);\nconst\nbr = #13#10;\nvar\nlinkinfo: tshelllinkinfostruct;\ns: string;\nbegin\nfillchar(linkinfo, sizeof(linkinfo), #0);\nlinkinfo.fullpathandnameoflinkfile := 'c:winntprofilesuserdesktopfilename.lnk';\ngetlinkinfo(@linkinfo);\nwith linkinfo do\ns := fullpathandnameoflinkfile + br +\nfullpathandnameoffiletoexecute + br +\nparamstringsoffiletoexecute + br +\nfullpathandnameofworkingdirectroy + br +\ndescription + br +\nfullpathandnameoffilecontiningicon + br +\ninttostr(iconindex) + br +\ninttostr(lobyte(hotkey)) + br +\ninttostr(hibyte(hotkey)) + br +\ninttostr(showcommand) + br +\nfinddata.cfilename + br +\nfinddata.calternatefilename;\nmemo1.lines.add(s);\nend;\n<\/div><\/pre>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u044f\u0440\u043b\u044b\u043a\u0435<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[448,462],"tags":[774,1573,1885],"_links":{"self":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/559"}],"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=559"}],"version-history":[{"count":0,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=\/wp\/v2\/posts\/559\/revisions"}],"wp:attachment":[{"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pblog.ru\/lab\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}