{"id":94,"date":"2011-05-22T08:17:48","date_gmt":"2011-05-22T08:17:48","guid":{"rendered":"http:\/\/devnot.wordpress.com\/?p=94"},"modified":"2011-05-22T08:17:48","modified_gmt":"2011-05-22T08:17:48","slug":"finding-out-whether-the-process-is-64-bits","status":"publish","type":"post","link":"https:\/\/thomas-jansen.eu\/?p=94","title":{"rendered":"Finding out whether the process is 64 bits"},"content":{"rendered":"<p>Although .NET is great in hiding whether a process is 32 or 64 bits sometimes you still need to know this. Most likely when using interop. You cannot interop a 64 bit .NET and a 32 bit dll and vice versa!<\/p>\n<p>Fortunately the <em>IntPtr.Size<\/em> property can be used for this.<\/p>\n<pre>if ( IntPtr.Size == 8 )\n{\n   \/\/ Pointer is 8 bytes -&gt; 64 bit\n}\nif ( IntPtr.Size == 4 )\n{\n   \/\/ Pointer is 4 bytes -&gt; 32 bit\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Although .NET is great in hiding whether a process is 32 or 64 bits sometimes you still need to know this. Most likely when using interop. You cannot interop a 64 bit .NET and a 32 bit dll and vice versa! Fortunately the IntPtr.Size property can be used for this. if ( IntPtr.Size == 8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[7,22],"class_list":["post-94","post","type-post","status-publish","format-standard","hentry","category-c","tag-64-bits-process","tag-detect"],"_links":{"self":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=94"}],"version-history":[{"count":0,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/94\/revisions"}],"wp:attachment":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}