{"id":1090,"date":"2009-11-01T11:59:34","date_gmt":"2009-11-01T09:59:34","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=1090"},"modified":"2009-11-01T11:59:34","modified_gmt":"2009-11-01T09:59:34","slug":"regsvr32-32-bit-vs-64-bit","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/1090","title":{"rendered":"regsvr32 32-bit vs. 64-bit"},"content":{"rendered":"<p><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms859484.aspx\">Regsvr32<\/a> tool is the one to register DLL hosted COM servers with the system, this is what many have learned without even knowing anything about COM.<\/p>\n<p>On 64-bit operating systems DLLs are 32-bit and 64-bit images, and an important thing about them is that there is no way to mix them in a single process. That is, 32-bit DLLs are for 32-bit processes, running inside <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa384249%28VS.85%29.aspx\">WOW64<\/a> subsystem, 64-bit DLLs are for native processes.<\/p>\n<p>So how comes that running regsvr32 from command line we can register both 32-bit and 64-bit DLLs. Does the system automatically identify image type of the DLL? Yes, the screenshot below illustrates registration of 64-bit DLL from command line &#8220;<em>regsvr32 FilterGraphSpy.dll<\/em>&#8220;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1091 alignnone\" title=\"regsvr32 FilterGraphSpy.dll (64-bit)\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/11\/01-Image001.png\" alt=\"regsvr32 FilterGraphSpy.dll (64-bit)\" width=\"366\" height=\"131\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/11\/01-Image001.png 366w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/11\/01-Image001-320x114.png 320w\" sizes=\"auto, (max-width: 366px) 100vw, 366px\" \/><\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/11\/01-Image002.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1092\" title=\"Process Explorer: regsvr32 Processes\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/11\/01-Image002-320x179.png\" alt=\"Process Explorer: regsvr32 Processes\" width=\"320\" height=\"179\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/11\/01-Image002-320x179.png 320w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/11\/01-Image002.png 763w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/p>\n<p>Command line interpreter starts a 32-bit version of regsvr32 tool, which is located in SysWOW64 directory. It detects that provided image is 64-bit and spawns a 64-bit twin from system32 directory, forwarding the registration task to it. The latter loads 64-bit DLL, being native 64-bit process itself, and does the thing.<\/p>\n<p>As simple as that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Regsvr32 tool is the one to register DLL hosted COM servers with the system, this is what many have learned without even knowing anything about COM. On 64-bit operating systems DLLs are 32-bit and 64-bit images, and an important thing about them is that there is no way to mix them in a single process.&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/1090\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-1090","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=1090"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1090\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=1090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=1090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=1090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}