Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7739573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:33:29+00:00 2026-06-01T08:33:29+00:00

This question is in continuation to my previous question . I am trying to

  • 0

This question is in continuation to my previous question.

I am trying to get Network Statistics for my Windows 7 system using PyWin32.

The steps I followed:

1) Run COM MakePy utility and than select network list manager 1.0
type library
under type library.

2) Above process generated this python file.

Next I created the object of class NetworkListManager(CoClassBaseClass) using

import win32com.client as wc
obj = wc.Dispatch("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}")

Now I am trying to access the methods provided by the above created object obj.

help(obj) gave me

GetNetwork(self, gdNetworkId= <PyOleEmpty object>)

Get a network given a Network ID.

IsConnected

Returns whether connected to internet or not

//Other methods removed

So, now when I use

>>> obj.IsConnected
True

It works fine.

Now the problem I am facing is how to use GetNetowrk method because when I try to use it

>>> obj.GetNetwork()
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
      ret = self._oleobj_.InvokeTypes(2, LCID, 1, (9, 0), ((36, 1),),gdNetworkId
com_error: (-2147024809, 'The parameter is incorrect.', None, None)

I also tried creating PyOleEmpty object by using pythoncom.Empty and passed it as a paremeter but no luck.

I understand GetNetwork require NetworkID as a parameter but the method GetNetworkId is defined in INetwork class.

So my question is how to use classes defined in the python file created using MakePy utility which are not CoClass.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:33:31+00:00Added an answer on June 1, 2026 at 8:33 am

    It looks like the way to get to the Network objects is to enumerate them using GetNetworks:

    networks=obj.GetNetworks(win32com.client.constants.NLM_ENUM_NETWORK_CONNECTED)
    for network in networks:
        print (network.GetName(), network.GetDescription())
    

    Using the network ids will be problematic. They’re defined as raw structs, so they will need to be passed using Records. Pywin32’s support for the IRecordInfo interface is still somewhat weak.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is a continuation of my previous question here zend models architecture (big
This is a continuation of my previous question .NET regex engine returns no matches
This is a continuation of my previous question which I posted when I wasn't
This is a continuation from a previous stackoverflow question. I've renamed some variables so
This question is a continuation of a previous thread to compare two lists with
This question is in continuation to my previous question, in which I asked about
This is in continuation to my previous question which was closed cause of similarity
This is a continuation of my previous question: Could not find an implementation of
This question is in continuation to my previous post located here . Since there
This is a continuation of a previous question . I have: var X =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.