{"id":309,"date":"2014-08-09T09:06:13","date_gmt":"2014-08-09T18:06:13","guid":{"rendered":"http:\/\/blog.box.kr\/?p=309"},"modified":"2014-08-09T09:06:13","modified_gmt":"2014-08-09T18:06:13","slug":"mfc-%eb%a9%94%eb%aa%a8%eb%a6%ac-%ea%b4%80%eb%a0%a8-%ec%a0%95%eb%b3%b4-%ed%9a%8d%eb%93%9d","status":"publish","type":"post","link":"https:\/\/blog.box.kr\/?p=309","title":{"rendered":"[MFC] &#8211; \uba54\ubaa8\ub9ac \uad00\ub828 \uc815\ubcf4 \ud68d\ub4dd"},"content":{"rendered":"<h3 class=\"title\" style=\"font-weight: bold; color: #ffffff;\"><\/h3>\n<div class=\"article\" style=\"color: #000000;\">\n<div>\n<\/div>\n<p><span class=\"Apple-style-span\"><span class=\"Apple-style-span\" style=\"font-weight: bold;\">GlobalMemoryStatus()\ud568\uc218\u00a0MSDN\u00a0\ucc38\uace0\u00a0\uc608\uc81c<\/span><\/p>\n<p>#include\u00a0&lt;windows.h&gt;<\/p>\n<p>#define\u00a0DIV\u00a01024<\/p>\n<p>char\u00a0*divisor\u00a0=\u00a0&#8220;K&#8221;;<\/p>\n<p>void<br \/>\nmain(int\u00a0argc,\u00a0char\u00a0*argv[])<br \/>\n{<br \/>\nMEMORYSTATUS\u00a0stat;<\/p>\n<p>GlobalMemoryStatus\u00a0(&amp;stat);<\/p>\n<p>printf\u00a0(&#8220;The\u00a0MEMORYSTATUS\u00a0structure\u00a0is\u00a0%ld\u00a0bytes\u00a0long.n&#8221;,<br \/>\n<span id=\"callbacknestwabartistorycom3491290\"><\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0stat.dwLength);<br \/>\nprintf\u00a0(&#8220;It\u00a0should\u00a0be\u00a0%d.n&#8221;,\u00a0sizeof\u00a0(stat));<br \/>\nprintf\u00a0(&#8220;There\u00a0is\u00a0%ld\u00a0percent\u00a0of\u00a0memory\u00a0in\u00a0use.n&#8221;,<br \/>\nstat.dwMemoryLoad);<br \/>\nprintf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0total\u00a0%sbytes\u00a0of\u00a0physical\u00a0memory.n&#8221;,<br \/>\nstat.dwTotalPhys\/DIV,\u00a0divisor);<br \/>\nprintf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0free\u00a0%sbytes\u00a0of\u00a0physical\u00a0memory.n&#8221;,<br \/>\nstat.dwAvailPhys\/DIV,\u00a0divisor);<br \/>\nprintf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0total\u00a0%sbytes\u00a0of\u00a0paging\u00a0file.n&#8221;,<br \/>\nstat.dwTotalPageFile\/DIV,\u00a0divisor);<br \/>\nprintf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0free\u00a0%sbytes\u00a0of\u00a0paging\u00a0file.n&#8221;,<br \/>\nstat.dwAvailPageFile\/DIV,\u00a0divisor);<br \/>\nprintf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0total\u00a0%sbytes\u00a0of\u00a0virtual\u00a0memory.n&#8221;,<br \/>\nstat.dwTotalVirtual\/DIV,\u00a0divisor);<br \/>\nprintf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0free\u00a0%sbytes\u00a0of\u00a0virtual\u00a0memory.n&#8221;,<br \/>\nstat.dwAvailVirtual\/DIV,\u00a0divisor);<br \/>\n}<\/span>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>GlobalMemoryStatus()\ud568\uc218\u00a0MSDN\u00a0\ucc38\uace0\u00a0\uc608\uc81c #include\u00a0&lt;windows.h&gt; #define\u00a0DIV\u00a01024 char\u00a0*divisor\u00a0=\u00a0&#8220;K&#8221;; void main(int\u00a0argc,\u00a0char\u00a0*argv[]) { MEMORYSTATUS\u00a0stat; GlobalMemoryStatus\u00a0(&amp;stat); printf\u00a0(&#8220;The\u00a0MEMORYSTATUS\u00a0structure\u00a0is\u00a0%ld\u00a0bytes\u00a0long.n&#8221;, \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0stat.dwLength); printf\u00a0(&#8220;It\u00a0should\u00a0be\u00a0%d.n&#8221;,\u00a0sizeof\u00a0(stat)); printf\u00a0(&#8220;There\u00a0is\u00a0%ld\u00a0percent\u00a0of\u00a0memory\u00a0in\u00a0use.n&#8221;, stat.dwMemoryLoad); printf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0total\u00a0%sbytes\u00a0of\u00a0physical\u00a0memory.n&#8221;, stat.dwTotalPhys\/DIV,\u00a0divisor); printf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0free\u00a0%sbytes\u00a0of\u00a0physical\u00a0memory.n&#8221;, stat.dwAvailPhys\/DIV,\u00a0divisor); printf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0total\u00a0%sbytes\u00a0of\u00a0paging\u00a0file.n&#8221;, stat.dwTotalPageFile\/DIV,\u00a0divisor); printf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0free\u00a0%sbytes\u00a0of\u00a0paging\u00a0file.n&#8221;, stat.dwAvailPageFile\/DIV,\u00a0divisor); printf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0total\u00a0%sbytes\u00a0of\u00a0virtual\u00a0memory.n&#8221;, stat.dwTotalVirtual\/DIV,\u00a0divisor); printf\u00a0(&#8220;There\u00a0are\u00a0%ld\u00a0free\u00a0%sbytes\u00a0of\u00a0virtual\u00a0memory.n&#8221;, stat.dwAvailVirtual\/DIV,\u00a0divisor); }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[9,19,7],"tags":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5q9Zn-4Z","jetpack-related-posts":[{"id":317,"url":"https:\/\/blog.box.kr\/?p=317","url_meta":{"origin":309,"position":0},"title":"\ud55c\uae00 \ucd08\uc131\uc54c\uc544\ub0b4\uae30","date":"2014-08-09","format":false,"excerpt":"\uc6d0\uae00 :\u00a0http:\/\/ehclub.tistory.com\/entry\/%ED%95%9C%EA%B8%80-%EC%B4%88%EC%84%B1-%EC%95%8C%EC%95%84%EB%82%B4%EA%B8%B0 \u00a0 ===================================================================================================== \u00a0 \u3132, \u3138, \u3143, \u3146, \u3149 => \ucd94\uac00 ... const char *isarr[19] = {\"\u3131\",\"\u3132\",\"\u3134\",\"\u3137\",\"\u3138\",\"\u3139\",\"\u3141\",\"\u3142\",\"\u3143\",\"\u3145\",\"\u3146\",\"\u3147\",\"\u3148\",\"\u3149\",\"\u314a\",\"\u314b\",\"\u314c\",\"\u314d\",\"\u314e\"}; \u00a0 ===================================================================================================== \u00a0 \u00a0 \ud55c\uae00 \ucd08\uc131 \uc54c\uc544\ub0b4\uae30 \uc6d0\ub9ac\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. (\uc9c0\uc2ddiN\uc9c8\ubb38 \ub2f5\ubcc0\ud558\ub2e4\uac00 \ub9cc\ub4e4\uc5b4 \ubd24\uc2b5\ub2c8\ub2e4.) \u00a0 \uc785\ub825 \ubb38\uc790\uc5f4\uc774 \"\uac00\"\ubcf4\ub2e4 \ud06c\uac70\ub098 \uac19\uace0\u00a0\"\ub098\"\ubcf4\ub2e4 \uc791\uc73c\uba74 \ucd08\uc131\uc740 \"\u3131\" \uc785\ub825 \ubb38\uc790\uc5f4\uc774 \"\ub098\"\ubcf4\ub2e4 \ud06c\uac70\ub098 \uac19\uace0\u00a0\"\ub098\"\ubcf4\ub2e4 \uc791\uc73c\uba74 \ucd08\uc131\uc740 \"\u3134\" \uc785\ub825\u2026","rel":"","context":"In &quot;C\/C++&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":216,"url":"https:\/\/blog.box.kr\/?p=216","url_meta":{"origin":309,"position":1},"title":"BSTR &#8211; char*\uac04\uc758 \ubcc0\ud658 \ubc0f BSTR\uc5d0 \ub300\ud574&#8230;","date":"2014-07-23","format":false,"excerpt":"BSTR - char*\uac04\uc758 \ubcc0\ud658 #include <afxconv.h>void BSTRtoCHAR(char *Msg[], const BSTR conv) { USES_CONVERSION; strcpy( *Msg, OLE2T(conv) ); }void CHARtoBSTR( BSTR *Msg, const char *conv ) { USES_CONVERSION; *Msg = T2OLE(conv); \/\/ *Msg = SysAllocString( A2W(conv) ); } \u00a0strText=SysAllocStringLen(szOleChar,iLen); \u00a0 \/\/ BSTR\uc5d0 \uacf5\uac04 \ud560\ub2f9.. printf(\"SysStringLen(strText) = %un\",SysStringLen(strText)); \u00a0 \u00a0\/\/ BSTR String\uc758\u2026","rel":"","context":"In &quot;C\/C++&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1158,"url":"https:\/\/blog.box.kr\/?p=1158","url_meta":{"origin":309,"position":2},"title":"c++ how to handling to arguments","date":"2016-08-11","format":false,"excerpt":"#include <stdio.h> #include <stdlib.h> \u00a0\/\/ exit() int main(int argc, char* argv[]) { if (argc == 1) { fputs(\"Error no inputs..\\n\", stderr); exit(1); } \/\/ print\u00a0options count printf(\"input count is \u00a0%d \\n\\n\", argc - 1); \/\/\u00a0print input arguments for (int i = 1; i < argc; i++) printf(\"argv[%d] = %s\\n\", i,\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":872,"url":"https:\/\/blog.box.kr\/?p=872","url_meta":{"origin":309,"position":3},"title":"[\ud38c]\ud328\uce58 \ud30c\uc77c \ub9cc\ub4dc\ub294 \ubc95\uacfc \uc801\uc6a9\ud558\ub294 \ubc95","date":"2015-06-03","format":false,"excerpt":"http:\/\/coffeenix.net\/doc\/misc\/patch.html \ud328\uce58 \ud30c\uc77c \ub9cc\ub4dc\ub294 \ubc95\uacfc \uc801\uc6a9\ud558\ub294 \ubc95 \ud328\uce58 \ud30c\uc77c\uc758 \uc4f0\uc784 \ud328\uce58(patch) \ud30c\uc77c\uc740 \ub450 \ud30c\uc77c\ub4e4\uac04\uc758 \ucc28\uc774\ub4e4\uc744 \ucd9c\ub825\ud574 \uc8fc\ub294 \ud504\ub85c\uadf8\ub7a8\uc778 diff\uc5d0 \uc758\ud574 \uc0dd\uc131\ub41c \ud30c\uc77c\uc744 \uc758\ubbf8\ud55c\ub2e4. \uc8fc\ub85c \uc4f0\uc774\ub294 \ub54c\ub294 \uc5b4\ub5a4 \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uae30\ub2a5\ud5a5\uc0c1\uc774\ub098 \ubb38\uc81c\uc810\uc744 \ud574\uacb0\ud558\uae30 \uc704\ud574 \uc18c\uc2a4\ud30c\uc77c\ub4e4\uc744 \uace0\uce58\uace0 \ub098\uc11c \uace0\uce5c \ubd80\ubd84\uc5d0 \ub300\ud55c \uc815\ubcf4\ub9cc\uc744 \uae30\ub85d\ud574 \ub193\uace0 \uc2f6\uc744\ub54c \uc4f0\uc778\ub2e4. \uace0\uce5c \uc18c\uc2a4\ud30c\uc77c \uc804\uccb4\ubcf4\ub2e4\ub3c4 \uace0\uce5c \ubd80\ubd84\uc5d0 \ub300\ud55c \uc815\ubcf4\ub9cc\uc744\u2026","rel":"","context":"In &quot;\uae30\uc220\uc790\ub8cc&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":625,"url":"https:\/\/blog.box.kr\/?p=625","url_meta":{"origin":309,"position":4},"title":"[\ud38c]JAVA \ud654\uc77c \uac10\uc2dc \ud504\ub85c\uadf8\ub7a8 \ub9cc\ub4e4\uae30.","date":"2015-03-21","format":false,"excerpt":"\uc77c\uc744 \ud558\ub2e4\ubcf4\uba74 \ud2b9\uc815 \ub514\ub809\ud1a0\ub9ac\ub97c \uac10\uc2dc\ud558\uc5ec \ud2b9\uc815 \uc870\uac74\uc774 \ub418\uba74 \uc874\uc7ac \ud558\ub294 \ud654\uc77c\uc744 \ucc98\ub9ac \ud558\ub294 \ud504\ub85c\uadf8\ub7a8\uc774 \ud544\uc694 \ud560\ub54c\uac00 \uc788\ub2e4. \u00a0 \ubcf4\ud1b5\uc740 C\/C++\ub85c \uc791\uc5c5 \ud558\ub294\ub370 \uc5b4\ucc0c\ub2e4 \ubcf4\ub2c8 \ubcf4\uac8c\ub41c \ube14\ub85c\uadf8\uc5d0\uc11c \uc5b4\ub5a4 \ubd84\uc774 JAVA\ub85c \ub9cc\ub4e4\uc5b4 \ub193\uc740\uac8c \uc788\uc5b4\uc11c \uac08\ubb34\ub9ac \ud55c\ub2e4. \u00a0 \u00a0 http:\/\/okky.kr\/article\/272376 \u00a0 Main.java public class Main { \/\/ file moved original public static final\u2026","rel":"","context":"In &quot;JAVA&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":200,"url":"https:\/\/blog.box.kr\/?p=200","url_meta":{"origin":309,"position":5},"title":"\uc774\ubc88 \ud3ec\uc2a4\ud305\uc740 \ud2b9\uc815\uc0ac\uc774\ud2b8\uc758 HTML \ud0dc\uadf8\ub97c\u2026","date":"2014-07-16","format":false,"excerpt":"\uc774\ubc88 \ud3ec\uc2a4\ud305\uc740 \ud2b9\uc815\uc0ac\uc774\ud2b8\uc758 HTML \ud0dc\uadf8\ub97c \uac00\uc838\uc640\uc11c \ucd9c\ub825\ud558\ub294 \uac83\uae4c\uc9c0 \ub2e4\ub8f9\ub2c8\ub2e4. \uac1c\ubc1c \ud234\uc740 Visual Studio 2012\ub97c \uc0ac\uc6a9\ud588\uc2b5\ub2c8\ub2e4. # \ud654\uba74 \uad6c\uc131 - url \uc601\uc5ed - url \uc774\ub3d9 \ubc84\ud2bc - html \uac00\uc838\uc624\uae30 \ubc84\ud2bc - webBrowser \uc601\uc5ed - \ub514\ubc84\uae451 \uc601\uc5ed - \ub514\ubc84\uae452 \uc601\uc5ed \uacb0\uacfc\ubb3c\ub294 \uac04\ub2e8\ud569\ub2c8\ub2e4. \ud574\ub2f9 URL\uc5d0 \uc774\ub3d9\ud558\uc5ec webBrowser\uc758 \ud6c4\ud0b9(?) \ucf5c\ubc31(?)\u00a0\uc815\ubcf4\ub97c \ucd9c\ub825(\ub514\ubc84\uae451)\ud558\uace0 scan\ubc84\ud2bc\uc744 \ud1b5\ud574 html\ub0b4\uc6a9\uc744\u2026","rel":"","context":"In &quot;C\/C++&quot;","img":{"alt_text":"","src":"http:\/\/cfile23.uf.tistory.com\/image\/236391385315B70E32D9B7","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/309"}],"collection":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=309"}],"version-history":[{"count":0,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/309\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}