{"id":93,"date":"2012-06-19T14:30:23","date_gmt":"2012-06-19T05:30:23","guid":{"rendered":"http:\/\/soundengine.jp\/wordpress\/tips\/?p=93"},"modified":"2014-02-06T23:42:41","modified_gmt":"2014-02-06T14:42:41","slug":"%e3%82%b3%e3%83%b3%e3%82%bd%e3%83%bc%e3%83%ab%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e7%b5%90%e6%9e%9c%e5%8f%96%e5%be%971","status":"publish","type":"post","link":"https:\/\/soundengine.jp\/wordpress\/tips\/try\/93\/","title":{"rendered":"\u30b3\u30f3\u30bd\u30fc\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u7d50\u679c\u53d6\u5f97(1)"},"content":{"rendered":"<p>\u305f\u307e\u306b\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306aTips\u306a\u3069\u3002<\/p>\n<p>Windows\u74b0\u5883\u306b\u304a\u3044\u3066\u305f\u307e\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u9055\u3046\u30b3\u30f3\u30bd\u30fc\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3(\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3)\u547c\u3093\u3060\u308a\u3059\u308b\u306e\u3060\u304c(SoundEngine\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u3082\u547c\u3093\u3067\u3044\u308b)\u3001\u3053\u306e\u6642\u305d\u306e\u7d50\u679c\u3092\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u53d6\u5f97\u3067\u304d\u308b\u3068\u3044\u3044\u306a\u3068\u3044\u3046\u3053\u3068\u3067\u3002<\/p>\n<p><!--more--><\/p>\n<h2 id=\"content_1_0\">\u30d1\u30a4\u30d7  <a class=\"anchor_super\" id=\"wf7bd0f4\" href=\"http:\/\/soundengine.jp\/backend\/?services%2Ftips%2F2007-01-19#wf7bd0f4\" title=\"wf7bd0f4\"> <\/a><\/h2>\n<p>\u8272\u3005\u8abf\u3079\u3066\u307f\u305f\u304c\u3069\u3046\u3084\u3089\u30d1\u30a4\u30d7\u3092\u4f7f\u3063\u3066\u3084\u308b\u3068\u3044\u3046\u306e\u304c\u5e38\u5957\u624b\u6bb5\u306e\u3088\u3046\u3060\u3002\u30d1\u30a4\u30d7\u3068\u3044\u3046\u306e\u306f\u30d7\u30ed\u30bb\u30b9\u9593\u901a\u4fe1\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3082\u306e\u3067\u3001CreatePipe\u3067\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u30d1\u30a4\u30d7\u3092\u3053\u306eCreatePipe\u3067\u4f5c\u308b\u3068\u3001\u8aad\u307f\u53d6\u308a\u5074\u30cf\u30f3\u30c9\u30eb\u3068\u66f8\u304d\u8fbc\u307f\u5074\u30cf\u30f3\u30c9\u30eb\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3053\u306e\u66f8\u304d\u8fbc\u307f\u5074\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u6e21\u3057\u3066\u8aad\u307f\u8fbc\u307f\u5074\u3067\u3053\u3061\u3089\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u8aad\u3093\u3067\u3042\u3052\u308c\u3070\u3088\u3044\u3068\u3044\u3046\u3053\u3068\u306e\u3088\u3046\u3060\u3002\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0(Visual C++)\u3067\u306f\u3001<\/p>\n<pre>HANDLE hReadPipe;\r\nHANDLE hWritePipe;\r\n\r\nSECURITY_ATTRIBUTES PipeAttributes;\r\nZeroMemory( &amp;PipeAttributes, sizeof( SECURITY_ATTRIBUTES ) );\r\n\r\nPipeAttributes.nLength = sizeof( SECURITY_ATTRIBUTES ); \r\nPipeAttributes.bInheritHandle = TRUE; \r\nPipeAttributes.lpSecurityDescriptor = NULL; \r\n\r\nif( !CreatePipe( &amp;hReadPipe, &amp;hWritePipe, &amp;PipeAttributes, 0 ) )\r\n{\r\n    \/\/ \u5931\u6557\r\n}<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u30d1\u30a4\u30d7\u306f\u5b8c\u6210\u3002bInheritHandle\u306f\u30cf\u30f3\u30c9\u30eb\u306e\u7d99\u627f\u3068\u3044\u3046\u3053\u3068\u3089\u3057\u3044\u3002\u3053\u306e\u3042\u3068\u3001\u8272\u3005\u3068\u307f\u305f\u4f8b\u3067\u306fDuplicateHandle\u3092\u3057\u3066\u3044\u308b\u306e\u3060\u304c\u3084\u3089\u306a\u304f\u3066\u3082\u7279\u306b\u554f\u984c\u306a\u304f\u8ab2\u984c\u3092\u9054\u6210\u3067\u304d\u3066\u3057\u307e\u3063\u305f\u3002\u7d50\u5c40\u3001DuplicateHandle\u306f\u4f55\u3092\u3059\u308b\u306e\u304b\u3088\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u3044\u3001\u3001\u3001\u8981\u8abf\u67fb\u3002<\/p>\n<div class=\"jumpmenu\">\n<\/div>\n<h2 id=\"content_1_1\">CreateProcess  <a class=\"anchor_super\" id=\"re59c922\" href=\"http:\/\/soundengine.jp\/backend\/?services%2Ftips%2F2007-01-19#re59c922\" title=\"re59c922\"> <\/a><\/h2>\n<pre>PROCESS_INFORMATION ProcessInformation; \r\nZeroMemory( &amp;ProcessInformation, sizeof( PROCESS_INFORMATION ) );\r\n\r\nSTARTUPINFO StartUpInfo;\r\nZeroMemory( &amp;StartUpInfo, sizeof( STARTUPINFO ) );\r\nStartUpInfo.cb = sizeof( STARTUPINFO );\r\nStartUpInfo.dwFlags = STARTF_USESTDHANDLES;\r\nStartUpInfo.hStdOutput = hWritePipe;\r\n\r\nTCHAR pCommandLine[] = _T( \"ipconfig\" );\r\n\r\nif( !CreateProcess\r\n    (\r\n    NULL,\r\n    pCommandLine,\r\n    NULL,\r\n    NULL,\r\n    TRUE, \r\n    0,\r\n    NULL, \r\n    NULL, \r\n    &amp;StartUpInfo,\r\n    &amp;ProcessInformation \r\n    ) )\r\n    {\r\n         \/\/ \u5931\u6557\r\n    }<\/pre>\n<p>\u30d7\u30ed\u30bb\u30b9\u8d77\u52d5\u90e8\u5206\u306f\u3053\u3093\u306a\u611f\u3058\u3002StartUpInfo.dwFlags = STARTF_USESTDHANDLES;StartUpInfo.hStdOutput = hWritePipe;\u3068\u3084\u308b\u6a19\u6e96\u51fa\u529b\u3092\u66f8\u304d\u8fbc\u307f\u7528\u306e\u30d1\u30a4\u30d7\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u3060\u3002<\/p>\n<p>\u3053\u3053\u3067\u3001\u6ce8\u610f\u70b9\u306fCreateProcess\u306e\u7b2c\u4e8c\u5f15\u6570\u306b\u305d\u306e\u307e\u307e\u3001_T( &#8220;ipconfig&#8221; )\u306a\u3069\u3068\u66f8\u3044\u3066\u3082\u30b3\u30f3\u30d1\u30a4\u30eb\u30fb\u30d3\u30eb\u30c9\u306f\u901a\u3063\u3066\u3057\u307e\u3046\u306e\u3060\u304c\u5b9f\u884c\u6642\u306b\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u3002<\/p>\n<blockquote>\n<p class=\"quotation\">0x7c82f293 \u3067\u30cf\u30f3\u30c9\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f: 0xC0000005: \u5834\u6240 0x00415a18 \u306b\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a2\u30af\u30bb\u30b9\u9055\u53cd\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002<\/p>\n<\/blockquote>\n<p>\u3053\u3093\u306a\u611f\u3058\u3002kernel32.dll!7c82f293()\u3068\u3044\u3046\u3068\u3053\u3067\u30d6\u30ec\u30a4\u30af\u3057\u3066\u3044\u308b\u306e\u3060\u304c\u3001\u3053\u308c\u304c\u307e\u305f\u3055\u3063\u3071\u308a\u306a\u306e\u3060\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u305f\u307e\u306b\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306aTips\u306a\u3069\u3002 Windows\u74b0\u5883\u306b\u304a\u3044\u3066\u305f\u307e\u306b\u30a2\u30d7\u30ea &hellip; <a href=\"https:\/\/soundengine.jp\/wordpress\/tips\/try\/93\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-try"],"_links":{"self":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":6,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"predecessor-version":[{"id":3379,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts\/93\/revisions\/3379"}],"wp:attachment":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}