title: 64 bit python is building a 32 bit COM server
body: <pre class="lang-py prettyprint-override"><code>import platform 
  platform.architecture() #('64bit', 'WindowsPE')
  </code></pre>
  <p>I'm running on 64 bit, specifically:<br />
  Python 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit<br />
  (AMD64)] :: Anaconda, Inc. on win32`</p>
  <p>I created a COM server which I'd like to call from a 64 bit client:</p>
  <pre class="lang-py prettyprint-override"><code>class HelloWorld:
      # pythoncom.CreateGuid()
      _reg_clsid_ = &quot;{E32B2663-BD8C-472A-AC96-142AE4665FD7}&quot;
      _reg_desc_ = &quot;MyLib COM server&quot;
      _reg_progid_ = &quot;MyLib.HelloWorld&quot;
  
      _public_methods_ = [&quot;Hello&quot;]
      _public_attrs_ = [&quot;softspace&quot;, &quot;noCalls&quot;]
      _readonly_attrs_ = [&quot;noCalls&quot;]
  
      def __init__(self):
          self.softspace = 1
          self.noCalls = 0
  
      def Hello(self, who):
          self.noCalls = self.noCalls + 1
          # insert &quot;softspace&quot; number of spaces
          return &quot;Hello&quot; + &quot; &quot; * self.softspace + str(who)
  
  if __name__ == '__main__':
      import win32com.server.register
      win32com.server.register.UseCommandLine(HelloWorld)
  </code></pre>
  <p><em>Registered using: <code>python server.py</code> - (call the <code>__main__</code> method to register the server)</em></p>
  <p>From a 64 bit COM client (Excel VBA), I am unable to create an instance</p>
  <pre class="lang-vb prettyprint-override"><code>Sub t()
      Dim a As Object
      Set a = CreateObject(&quot;MyLib.HelloWorld&quot;)
  End Sub
  </code></pre>
  <p>I get</p>
  <blockquote>
  <p>Module not found</p>
  </blockquote>
  <p>I can in python 64 bit</p>
  <pre class="lang-py prettyprint-override"><code>from comtypes.client import CreateObject
  c = CreateObject('MyLib.HelloWorld')
  </code></pre>
  <p>I can in a 32 bit VBA host.<br />
  I'm guessing my python server is being declared 32 bit, python comtypes <em>just works<sup>TM</sup></em> regardless of server bitness.</p>