GSM Shop GSM Shop
GSM-Forum  

Welcome to the GSM-Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features.
Only registered members may post questions, contact other members or search our database of over 8 million posts.

Registration is fast, simple and absolutely free so please - Click to REGISTER!

If you have any problems with the registration process or your account login, please contact contact us .

Go Back   GSM-Forum > Other Gsm/Mobile Related Forums > GSM Programming & Reverse Engineering


GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets.

Reply
 
LinkBack Thread Tools Display Modes
Old 07-30-2011, 12:55   #1 (permalink)
Freak Poster
 
Join Date: Aug 2009
Location: E G Y P T
Age: 26
Posts: 347
Member: 1102520
Status: Offline
Sonork: 100.1617999
Thanks Meter: 94
Get port name in vb.net


hey all,
please i developed a program that connects to usb modem and perform some operations.
i used the sticked topic but it only shows "COM1" how can i make it show "COM1 Vodafone Mobile Broadband" or "Vodafone Mobile Broadband"
please help me
thanks in advance
  Reply With Quote
Old 07-30-2011, 13:32   #2 (permalink)
No Life Poster
 
fr3nsis's Avatar
 
Join Date: Oct 2005
Location: Rome , Italy
Posts: 1,530
Member: 190882
Status: Offline
Sonork: BB PIN: 7C83D9CE
Thanks Meter: 1,282
Donate money to this user
System.Management

http://forum.gsmhosting.com/vbb/f83/...1/#post5709924
  Reply With Quote
The Following 3 Users Say Thank You to fr3nsis For This Useful Post:
Show/Hide list of the thanked
Old 07-30-2011, 23:58   #3 (permalink)
Freak Poster
 
Join Date: Aug 2009
Location: E G Y P T
Age: 26
Posts: 347
Member: 1102520
Status: Offline
Sonork: 100.1617999
Thanks Meter: 94
That's awesome
thank you very much
  Reply With Quote
Old 07-31-2011, 00:20   #4 (permalink)
Freak Poster
 
Join Date: Aug 2009
Location: E G Y P T
Age: 26
Posts: 347
Member: 1102520
Status: Offline
Sonork: 100.1617999
Thanks Meter: 94
i am using this code
Quote:
Public Function ModemsConnected() As String
Dim modems As String = ""
Try
Dim searcher As New ManagementObjectSearcher( _
"root\CIMV2", _
"SELECT * FROM Win32_POTSModem")

For Each queryObj As ManagementObject In searcher.Get()
If queryObj("Status") = "OK" Then
modems = modems & (queryObj("AttachedTo") & " - " & queryObj("Description") & "***")
End If
Next
Catch err As ManagementException
MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
Return ""
End Try
Return modems
End Function
but i get 3 errors management exception and object and objectsearcher us not defines
please help
thanks in advance
  Reply With Quote
Old 07-31-2011, 07:26   #5 (permalink)
No Life Poster
 
fr3nsis's Avatar
 
Join Date: Oct 2005
Location: Rome , Italy
Posts: 1,530
Member: 190882
Status: Offline
Sonork: BB PIN: 7C83D9CE
Thanks Meter: 1,282
Donate money to this user
need to import System.Management dll and declare it
  Reply With Quote
Old 07-31-2011, 12:42   #6 (permalink)
Freak Poster
 
Join Date: Aug 2009
Location: E G Y P T
Age: 26
Posts: 347
Member: 1102520
Status: Offline
Sonork: 100.1617999
Thanks Meter: 94
nice i got it to work but it shows all com ports not the usb modem.
so is there a solution that works like dc-unlocker or mobile partner (auto detect and connect)please??
thanks in advance
  Reply With Quote
Old 07-31-2011, 15:18   #7 (permalink)
No Life Poster
 
fr3nsis's Avatar
 
Join Date: Oct 2005
Location: Rome , Italy
Posts: 1,530
Member: 190882
Status: Offline
Sonork: BB PIN: 7C83D9CE
Thanks Meter: 1,282
Donate money to this user
yes need to modify...just think 2 minutes
  Reply With Quote
Old 08-01-2011, 15:52   #8 (permalink)
Freak Poster
 
Join Date: Aug 2009
Location: E G Y P T
Age: 26
Posts: 347
Member: 1102520
Status: Offline
Sonork: 100.1617999
Thanks Meter: 94
Is that right or is there a better way to do it??
Code:
 Public Function ModemsConnected() As String
        Dim modems As String = ""
        Try
            Dim searcher As New ManagementObjectSearcher( _
                "root\CIMV2", _
                "SELECT * FROM Win32_POTSModem")

            For Each queryObj As ManagementObject In searcher.Get()
                If queryObj("Status") = "OK" Then
                    modems = queryObj("Description")
                    ComboBox1.Items.Add(modems)
                    ComboBox1.SelectedIndex = ComboBox1.FindString("Vodafone")
                    If ComboBox1.SelectedItem = "" Then
                        ComboBox1.SelectedIndex = ComboBox1.FindString("Huawei")
                    End If



                End If
            Next
        Catch err As ManagementException
            MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
            Return ""
        End Try
        Return modems
    End Function
  Reply With Quote
Old 08-04-2011, 04:49   #9 (permalink)
Junior Member
 
Join Date: Mar 2011
Location: India
Posts: 33
Member: 1532690
Status: Offline
Thanks Meter: 1
Question how to import System.Management

how to import System.Management
tell me sir fast
thanks advance
  Reply With Quote
Old 08-04-2011, 05:18   #10 (permalink)
Junior Member
 
Join Date: Mar 2011
Location: India
Posts: 33
Member: 1532690
Status: Offline
Thanks Meter: 1
how to import System.Management

follow this step

step 1
select project >> add reference

step 2
select .net tab

step 3
find System.Management select and ok

step 4
add your project this line
import System.Management


BR,
YogeshPatel
  Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a language in 51xx/61xx tati Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 8 05-21-2013 19:20
Sp unlocking sim - if you can get or sell please let me know andrew bennett Wanted Products 1 09-24-1999 08:43
New menu item in 5110 GeoMan Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 3 09-23-1999 20:24
Lock 2 in nokia 51xx/61xx Pablo Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 1 07-31-1999 04:35
Nokia 6110 Net Monitor Frickles Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 3 07-26-1999 13:05

 



All times are GMT +1. The time now is 15:31.



Powered by Searchlight © 2024 Axivo Inc.
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
- GSM Hosting Ltd. - 1999-2023 -
Page generated in 0.19471 seconds with 9 queries

SEO by vBSEO