Results 1 to 6 of 6

Thread: Can I call a function from wlanapi.h ?

  1. #1

    Thread Starter
    New Member Calpgrmr's Avatar
    Join Date
    Nov 2023
    Posts
    7

    Question Can I call a function from wlanapi.h ?

    Hi. It's my first day on the forum, so excuse any mis-steps.

    What I'm trying to get is this (Windows Settings|Network & Internet):

    Name:  wifiStats.jpg
Views: 174
Size:  18.2 KB

    It's the user's current Wifi Data usage.

    Google lead me eventually here: https://learn.microsoft.com/en-us/wi...orkquerystatus

    Can I use it in VB/

    Thanks,

    Cal

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,247

    Re: Can I call a function from wlanapi.h ?

    You most likely can call that function. What flavour of VB are you using? VB.NET or VB6, or maybe VBA or VBScript?

  3. #3
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,572

    Re: Can I call a function from wlanapi.h ?

    There's nothing unusual about that API and you'd call it like any others, but I don't see where it might give the usage data.

    I'd stick an API monitor on the settings app and see if it turns up anything useful.

  4. #4

    Thread Starter
    New Member Calpgrmr's Avatar
    Join Date
    Nov 2023
    Posts
    7

    Re: Can I call a function from wlanapi.h ?

    I'm in VB (VS Community) 2022 .

    We live in the country, and a Verizon JetPack hot spot gadget is the only way to get internet. It is limited to 50 gigs of high speed per month, so I check it throughout the month.

    I'm writing a Personal Assistant app and am adding it to the stuff I track.

    fafalone (above) said "nothing unusual about that API and you'd call it like any others" What does that mean? In VB6 there was Declare Function. Is that still the way?

    Thanks.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,247

    Re: Can I call a function from wlanapi.h ?

    Quote Originally Posted by Calpgrmr View Post
    In VB6 there was Declare Function. Is that still the way?
    The VB6 way is still supported but the .NET way is to use the DllImport attribute. There are plenty of examples around of both.

  6. #6

    Thread Starter
    New Member Calpgrmr's Avatar
    Join Date
    Nov 2023
    Posts
    7

    Re: Can I call a function from wlanapi.h ?

    Quote Originally Posted by jmcilhinney View Post
    The VB6 way is still supported but the .NET way is to use the DllImport attribute. There are plenty of examples around of both.
    Thank you. I'll check it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width