{"id":5307,"date":"2014-03-30T20:35:27","date_gmt":"2014-03-30T20:35:27","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-obtain-the-consumption-memory-of-running-exe-collection-of-common-programming-errors\/"},"modified":"2014-03-30T20:35:27","modified_gmt":"2014-03-30T20:35:27","slug":"how-to-obtain-the-consumption-memory-of-running-exe-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-obtain-the-consumption-memory-of-running-exe-collection-of-common-programming-errors\/","title":{"rendered":"How to obtain the consumption memory of running &ldquo;exe&rdquo;-Collection of common programming errors"},"content":{"rendered":"<p>GetProcessMemoryInfo will tell you how much memory a process is using once you have a handle open to it. Microsoft even has an example for using the function.<\/p>\n<p>To get the process ID you&#8217;re looking for, you will need to enumerate through all the processes in the system. Microsoft has an example that would be useful for that too.<\/p>\n<p><b>Edit:<\/b> The examples are all in C. This is the language the Win32 API was designed for. From Java, you&#8217;ll either need to translate it to the JNI or find a Java package that does the same things.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GetProcessMemoryInfo will tell you how much memory a process is using once you have a handle open to it. Microsoft even has an example for using the function. To get the process ID you&#8217;re looking for, you will need to enumerate through all the processes in the system. Microsoft has an example that would be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5307","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5307"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5307\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}