Re: Help! How do I get the SSID of my connection?
- From: "Larry Lard" <larrylard@xxxxxxxxxxx>
- Date: 30 Mar 2006 02:12:42 -0800
[top posting fixed]
MikeD wrote:
"applebag" <applebag@xxxxxxxxx> wrote in message
news:1143665427.410178.12130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Larry Lard wrote:Now put Option Explicit back into the module and declare your variables. VB
applebag wrote:
As teh topic says, I would liek to programatically get the current SSID
(any any extra information on the connection if available) from within
VB6.
From my searches so far (I'm exhausted) I've thinking WMI is the onlyway. I have been unable to find any code I can use in VB6 however. I
did find this, but I'm not very good at converting vbscript to vb6. If
someone can get this converted and working, I would appreciate it.
(Assuming it'll work in VB6.) Of any other good code will do.
Here is the vbscript:
Put it in a module which *doesn't* have Option Explicit set. Remove the
On Error Resume Next line. Voila, it compiles. I get an automation
error when I call Function SSID, but that's presumable because I
haven't got a wireless network here. What do you get?
Thanks Larry!
I feel like a real newbie for not thinking for that. It works great! =)
will tell you what variables aren't declared.
You should ALWAYS use Option Explicit. Removing it to fix a "problem" is
only going to result in *real* bugs. The problem you're encountering isn't
with Option Explicit. It's that you're not explicitly declaring variables
(which is what Option Explicit protects against).
No offense to Larry, but IMO that was absolutely TERRIBLE advice.
Sorry, I must have missed the post where you gave him the source fixed
up to declare all the variables.
--
Larry Lard
Replies to group please
.
- Follow-Ups:
- References:
- Help! How do I get the SSID of my connection?
- From: applebag
- Re: Help! How do I get the SSID of my connection?
- From: Larry Lard
- Re: Help! How do I get the SSID of my connection?
- From: applebag
- Re: Help! How do I get the SSID of my connection?
- From: MikeD
- Help! How do I get the SSID of my connection?
- Prev by Date: Re: Extract Text From Images(jpg)
- Next by Date: Weird cmd.exe problem
- Previous by thread: Re: Help! How do I get the SSID of my connection?
- Next by thread: Re: Help! How do I get the SSID of my connection?
- Index(es):
Relevant Pages
|