title: PyWin32 using MakePy utility and win32com to get Network Statistics
body: <p>This question is in continuation to my <a href="https://stackoverflow.com/q/9970054/776084">previous question</a>.</p>
  
  <p>I am trying to get <code>Network Statistics</code> for my <code>Windows 7</code> system using <code>PyWin32</code>.</p>
  
  <p>The steps I followed:</p>
  
  <blockquote>
    <p>1) Run <code>COM MakePy utility</code> and than select <code>network list manager 1.0
    type library</code> under type library.</p>
    
    <p>2) Above process generated this <a href="http://pastebin.com/y7hQGQdR" rel="nofollow noreferrer">python file</a>.</p>
  </blockquote>
  
  <p>Next I created the object of  class <code>NetworkListManager(CoClassBaseClass)</code> using </p>
  
  <pre><code>import win32com.client as wc
  obj = wc.Dispatch("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}")
  </code></pre>
  
  <p>Now I am trying to access the methods provided by the above created object <code>obj</code>.</p>
  
  <p><code>help(obj)</code> gave me</p>
  
  <p><strong>GetNetwork(self, gdNetworkId= <code>&lt;PyOleEmpty object&gt;</code>)</strong></p>
  
  <pre><code>Get a network given a Network ID.
  </code></pre>
  
  <p><strong>IsConnected</strong></p>
  
  <pre><code>Returns whether connected to internet or not
  
  //Other methods removed
  </code></pre>
  
  <p>So, now when I use </p>
  
  <pre><code>&gt;&gt;&gt; obj.IsConnected
  True
  </code></pre>
  
  <p>It works fine.</p>
  
  <p>Now the problem I am facing is how to use <code>GetNetowrk</code> method because when I try to use it </p>
  
  <pre><code>&gt;&gt;&gt; obj.GetNetwork()
  Traceback (most recent call last):
    File "&lt;interactive input&gt;", line 1, in &lt;module&gt;
        ret = self._oleobj_.InvokeTypes(2, LCID, 1, (9, 0), ((36, 1),),gdNetworkId
  com_error: (-2147024809, 'The parameter is incorrect.', None, None)
  </code></pre>
  
  <p>I also tried creating <code>PyOleEmpty object</code> by using <code>pythoncom.Empty</code> and passed it as a paremeter but no luck.</p>
  
  <p>I understand <code>GetNetwork</code> require <code>NetworkID</code> as a parameter but the method <code>GetNetworkId</code> is defined in <a href="http://pastebin.com/qRWWjuD4" rel="nofollow noreferrer">INetwork</a> class.</p>
  
  <p>So my question is how to use classes defined in the python file created using <code>MakePy utility</code> which are not <code>CoClass</code>.</p>