title: kernel32.GetModuleHandleA returning strange value
body: <p>By running the code of python below with <code>python main.py wmi.dll</code>, I want to get the loading address of DLL. However, the value of <code>loadAddr</code> is <code>0</code>. What is wrong in the code?</p>
  <pre><code>from ctypes import *
  import sys
  import string
  
  kernel32 = windll.kernel32
  print(kernel32)
  
  if len(sys.argv)!=2:
      print(&quot;Usage : dll.py&lt;DLL to resolve&gt;&quot;)
      sys.exit(0)
  windll.LoadLibrary(sys.argv[1])
  loadAddr = kernel32.GetModuleHandleA(sys.argv[1])
  print(str(loadAddr)+&quot;\n&quot;)
  print(sys.argv[1])
  print(hex(loadAddr) + &quot; Load Address&quot;)
  print(hex(loadAddr + int(&quot;0x1000&quot;,16)) + &quot; Text segment&quot;)
  </code></pre>