{"id":4522,"date":"2014-03-30T13:11:56","date_gmt":"2014-03-30T13:11:56","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/combine-x86-and-x64-executables-in-single-executable-like-sysinternals-tools-collection-of-common-programming-errors\/"},"modified":"2014-03-30T13:11:56","modified_gmt":"2014-03-30T13:11:56","slug":"combine-x86-and-x64-executables-in-single-executable-like-sysinternals-tools-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/combine-x86-and-x64-executables-in-single-executable-like-sysinternals-tools-collection-of-common-programming-errors\/","title":{"rendered":"Combine x86 and x64 executables in single executable (like Sysinternals tools)-Collection of common programming errors"},"content":{"rendered":"<p>Yes, they embed the operating specific driver as a resource. Here&#8217;s a screenshot from Visual Studio after using File + Open + File to open their Handle.exe utility:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/aRKMr.png\" \/><\/p>\n<p>Not exactly sure what they are but it certainly looks like they cover Windows 9x, 32-bit and 64-bit. Next thing they&#8217;d do is use the resource API functions (FindResource, SizeofResource, LockResource) and WriteFile() the resource content to a file in a writable directory. Then load the driver with CreateService and StartService.<\/p>\n<p>The main program is x86 so it runs on any version of Windows. Generating binaries at runtime isn&#8217;t a very customer friendly thing to do btw, they (and their virus scanner) usually like to know what came from where.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yes, they embed the operating specific driver as a resource. Here&#8217;s a screenshot from Visual Studio after using File + Open + File to open their Handle.exe utility: Not exactly sure what they are but it certainly looks like they cover Windows 9x, 32-bit and 64-bit. Next thing they&#8217;d do is use the resource API [&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-4522","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4522","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=4522"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4522\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}