{"id":281,"date":"2017-08-02T22:52:43","date_gmt":"2017-08-02T13:52:43","guid":{"rendered":"http:\/\/village.s601.xrea.com\/tipps\/?p=281"},"modified":"2018-03-10T10:08:25","modified_gmt":"2018-03-10T01:08:25","slug":"post-281","status":"publish","type":"post","link":"http:\/\/village.s601.xrea.com\/tipps\/post-281","title":{"rendered":"Shell32.dll\u3092\u4f7f\u3063\u305fZIP\u30d5\u30a1\u30a4\u30eb\u306e\u89e3\u51cd"},"content":{"rendered":"<p><span class=\"red\"><span class=\"big2\">Shell32.dll<\/span><\/span><span class=\"red\"><span class=\"big2\">\u3092\u4f7f\u3063\u305f<\/span><\/span><span class=\"red\"><span class=\"big2\">ZIP<\/span><\/span><span class=\"red\"><span class=\"big2\">\u30d5\u30a1\u30a4\u30eb\u306e\u89e3\u51cd\uff08\u5c55\u958b\uff09\u51e6\u7406\u3092\u8a18\u8f09<\/span><\/span><\/p>\n<p><strong>MS\u975e\u63a8\u5968\u306e\u3084\u308a\u65b9\u306a\u306e\u3067\u8981\u6ce8\u610f\uff01\uff01<\/strong><\/p>\n<p><span class=\"red\"><span class=\"big2\"><\/span><\/span><\/p>\n<pre class=\"brush: cpp; highlight: [28]; title: ; notranslate\" title=\"\">\nbool bRet = false;\n\nCString strOutPutPath = _T(&quot;C:\\\\hoge\\\\hoge&quot;); \/\/ \u89e3\u51cd\u5148\u306e\u30d1\u30b9\u3092\u6307\u5b9a\nCString strZipPath = _T(&quot;C:\\\\huga\\\\huga.zip&quot;); \/\/ \u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\n\nShell32::IShellDispatchPtr pShell;\nShell32::FolderPtr pZipFile = NULL;\nShell32::FolderItemsPtr pZipItems = NULL;\nShell32::FolderPtr pOutPutDir = NULL;\ndo {\nCoInitialize(NULL);\nHRESULT hRet = S_FALSE;\nhRet = pShell.CreateInstance(__uuidof(Shell32::Shell));\nif ( hRet != S_OK){\nbreak;\n}\npZipFile = pShell-&amp;gt;NameSpace( (COleVariant)strZipPath );\nif(NULL == pZipFile){\nbreak;\n}\npZipItems= pZipFile-&amp;gt;Items();\npOutPutDir= pShell-&amp;gt;NameSpace( (COleVariant)strOutPutPath );\nif( (NULL == pZipItems) || (NULL == pOutPutDir) ){\nbreak;\n}\n\nlong iOpt = FOF_SILENT | FOF_NOCONFIRMATION; \/\/ \u30d7\u30ed\u30b0\u30ec\u30b9\u30d0\u30fc\u3092\u8868\u793a\u3057\u306a\u3044 \u78ba\u8a8d\u3082\u306a\u3057\nhRet = pOutPutDir-&amp;gt;CopyHere(_variant_t((IDispatch*)pZipItems,true), (COleVariant)iOpt);\nif(S_OK == hRet) {\nbRet = true;\n};\n} while(FALSE);\n\nif(pOutPutDir) {\npOutPutDir.Release();\npOutPutDir= NULL;\n}\nif(pZipItems) {\npZipItems.Release();\npZipItems= NULL;\n}\nif(pZipFile) {\npZipFile.Release();\npZipFile= NULL;\n}\n\nCoUninitialize();\n\nreturn bRet;\n<\/pre>\n<p>L28\u306e\u30ad\u30e3\u30b9\u30c8\u306b\u60a9\u3093\u3060\u3001\u3001\u3001<\/p>\n<p><span class=\"small\">IF<\/span><span class=\"small\">\u5206\u306e\u30cd\u30b9\u30c8\u304c\u5acc\u3060\u3063\u305f\u306e\u3067<\/span><span class=\"small\">do while(false)<\/span><span class=\"small\">\u3068\u3057\u305f\u3051\u3069\u3001<\/span><span class=\"small\"><br \/>\n<\/span><span class=\"small\">\u7121\u99c4\u306b\u30b9\u30c6\u30c3\u30d7\u6570\u5897\u3048\u305f\u306a\u3001\u3001\u3001\u3001<\/span><\/p>\n<p>ZIP\u30d5\u30a1\u30a4\u30eb\u306e\u5727\u7e2e\u51e6\u7406\u306f\u4ee5\u4e0b\u306e\u30b5\u30a4\u30c8\u53c2\u8003<br \/>\n<a href=\"http:\/\/www.softist.com\/programming\/shell32-zip\/shell32-zip.htm\" target=\"_blank\">shell32.dll<\/a><a href=\"http:\/\/www.softist.com\/programming\/shell32-zip\/shell32-zip.htm\" target=\"_blank\">\u3067\u30d5\u30a1\u30a4\u30eb\u5727\u7e2e<\/a><a href=\"http:\/\/www.softist.com\/programming\/shell32-zip\/shell32-zip.htm\" target=\"_blank\">(VC++)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shell32.dll\u3092\u4f7f\u3063\u305fZIP\u30d5\u30a1\u30a4\u30eb\u306e\u89e3\u51cd\uff08\u5c55\u958b\uff09\u51e6\u7406\u3092\u8a18\u8f09 MS\u975e\u63a8\u5968\u306e\u3084\u308a\u65b9\u306a\u306e\u3067\u8981\u6ce8\u610f\uff01\uff01 L28\u306e\u30ad\u30e3\u30b9\u30c8\u306b\u60a9\u3093\u3060\u3001\u3001\u3001 IF\u5206\u306e\u30cd\u30b9\u30c8\u304c\u5acc\u3060\u3063\u305f\u306e\u3067do while(false)\u3068\u3057\u305f\u3051\u3069\u3001 \u7121\u99c4\u306b\u30b9\u30c6&#8230;<\/p>\n","protected":false},"author":1,"featured_media":31,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[4,6],"tags":[46,44,45],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/village.s601.xrea.com\/tipps\/wp-content\/uploads\/sites\/3\/2014\/08\/lgi01a201408010800.jpg?fit=791%2C1024","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p48LeS-4x","jetpack-related-posts":[{"id":28,"url":"http:\/\/village.s601.xrea.com\/tipps\/%e9%96%a2%e6%95%b0%e3%83%86%e3%83%bc%e3%83%96%e3%83%ab%e3%81%ae%e5%ae%9f%e8%a3%85","url_meta":{"origin":281,"position":0},"title":"\u95a2\u6570\u30c6\u30fc\u30d6\u30eb\u306e\u5b9f\u88c5","date":"2014\u5e748\u67089\u65e5","format":false,"excerpt":"\u95a2\u6570\u30c6\u30fc\u30d6\u30eb\u306e\u767b\u9332\u3068\u767b\u9332\u3057\u305f\u95a2\u6570\u306e\u5b9f\u884c\u65b9\u6cd5\u306b\u3064\u3044\u3066 \u95a2\u6570\u30c6\u30fc\u30d6\u30eb\u3068\u30c6\u30fc\u30d6\u30eb\u306b\u767b\u9332\u3059\u308b\u95a2\u6570\u306e\u5b9a\u7fa9 \u95a2\u6570\u2026","rel":"","context":"\u8a00\u8a9e","img":{"alt_text":"","src":"https:\/\/i2.wp.com\/village.s601.xrea.com\/tipps\/wp-content\/uploads\/sites\/3\/2014\/08\/lgi01a201408010800.jpg?fit=791%2C1024&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":255,"url":"http:\/\/village.s601.xrea.com\/tipps\/post-255","url_meta":{"origin":281,"position":1},"title":"[onsen UI]iPhone\u3067\u8868\u793a\u3055\u308c\u3066Android\u3067\u8868\u793a\u3055\u308c\u306a\u3044","date":"2017\u5e745\u670829\u65e5","format":false,"excerpt":"Onsen UI\uff08ons-splitter\uff09\u3092\u4f7f\u3063\u3066\u30cf\u30a4\u30d6\u30ea\u30c3\u30c8\u30a2\u30d7\u30ea\u3092\u4f5c\u3063\u3066\u3044\u305f\u6642\u306b\u306f\u307e\u3063\u305f\u843d\u3068\u3057\u2026","rel":"","context":"Android","img":{"alt_text":"","src":"https:\/\/i1.wp.com\/village.s601.xrea.com\/tipps\/wp-content\/uploads\/sites\/3\/2015\/09\/android_icon.jpg?fit=280%2C280&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":177,"url":"http:\/\/village.s601.xrea.com\/tipps\/post-177","url_meta":{"origin":281,"position":2},"title":"Linux logrotate\u306e\u52d5\u4f5c\u78ba\u8a8d\u65b9\u6cd5","date":"2016\u5e741\u67089\u65e5","format":false,"excerpt":"Linux logrotate\u306e\u52d5\u4f5c\u78ba\u8a8d\u65b9\u6cd5 \u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u306b\u3066logrotate.status \u3092\u30aa\u2026","rel":"","context":"Linux","img":{"alt_text":"","src":"https:\/\/i2.wp.com\/village.s601.xrea.com\/tipps\/wp-content\/uploads\/sites\/3\/2014\/08\/lgi01a201408010800.jpg?fit=791%2C1024&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":74,"url":"http:\/\/village.s601.xrea.com\/tipps\/post-74","url_meta":{"origin":281,"position":3},"title":"\u81ea\u4f5cAndroid\u30a2\u30d7\u30ea\u306e\u4f5c\u6210\u3000\u5099\u5fd8\u9332-\u6e96\u5099","date":"2015\u5e749\u670826\u65e5","format":false,"excerpt":"Android\u30a2\u30d7\u30ea\u306e\u4f5c\u6210\u3092\u884c\u3063\u305f\u3068\u304d\u306e\u6e96\u5099 \u2460AndroidStudio\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u2461Andr\u2026","rel":"","context":"Android","img":{"alt_text":"","src":"https:\/\/i1.wp.com\/village.s601.xrea.com\/tipps\/wp-content\/uploads\/sites\/3\/2015\/09\/android_icon.jpg?fit=280%2C280&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":104,"url":"http:\/\/village.s601.xrea.com\/tipps\/post-104","url_meta":{"origin":281,"position":4},"title":"DFP\u5e83\u544a\u304c\u8868\u793a\u3055\u308c\u305f","date":"2015\u5e7410\u67082\u65e5","format":false,"excerpt":"Android\u30a2\u30d7\u30ea\u306b\u300cnend\u300d\u3068\u300cAdMob\u300d\u306e\u5e83\u544a\u3092\u4ea4\u4e92\u306b\u8868\u793a\u3092\u3059\u308b\u305f\u3081\u306b DFP(Doubl\u2026","rel":"","context":"Android","img":{"alt_text":"","src":"https:\/\/i1.wp.com\/village.s601.xrea.com\/tipps\/wp-content\/uploads\/sites\/3\/2015\/09\/android_icon.jpg?fit=280%2C280&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":265,"url":"http:\/\/village.s601.xrea.com\/tipps\/post-265","url_meta":{"origin":281,"position":5},"title":"\u30c9\u30e1\u30a4\u30f3\u304c\u9055\u3046\u30b5\u30fc\u30d0\u3078\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u3064\u3044\u3066","date":"2017\u5e746\u67089\u65e5","format":false,"excerpt":"\u9ebb\u96c0\u6226\u7e3e\u30a2\u30d7\u30ea\u3067\u767b\u9332\u3057\u305f\u81ea\u5206\u306e\u6210\u7e3e\u3092 WordPress\u306e\u56fa\u5b9a\u30da\u30fc\u30b8\u306b\u8868\u793a\u3055\u305b\u305f\u304f\u3066 \u56fa\u5b9a\u30da\u30fc\u30b8\u304b\u3089\u2026","rel":"","context":"HTML\/JavaScript","img":{"alt_text":"","src":"https:\/\/i2.wp.com\/village.s601.xrea.com\/tipps\/wp-content\/uploads\/sites\/3\/2014\/08\/lgi01a201408010800.jpg?fit=791%2C1024&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/posts\/281"}],"collection":[{"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/comments?post=281"}],"version-history":[{"count":11,"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/posts\/281\/revisions"}],"predecessor-version":[{"id":292,"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/posts\/281\/revisions\/292"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/media\/31"}],"wp:attachment":[{"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/media?parent=281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/categories?post=281"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/village.s601.xrea.com\/tipps\/wp-json\/wp\/v2\/tags?post=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}