Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.

Scan for presence of GPS card

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-26-2007, 12:57 PM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default Scan for presence of GPS card

Hi gang
Here is code by which I successfully scan presence of a CF type GPS card in iPAQ hx4700 h2200 Pocket PCs. Use or abuse at will :-)

Sub ScanGPS
Dim i, v, cab, key, GPSPort
reg.RootKey(reg.rtLocalMachine)
key = "Drivers\Active\"
v=9
NotCreated:
v = i + 1
For i = v to 99
cab=key & Format(i,"D2")
ErrorLabel(NotCreated)
PnpID = reg.GetValue(cab, "PnpID")
if StrLength(PnpID) > 3 then
if StrIndexOf(StrToUpper(PnpID),"GPS",0)<>-1 then
GPSPort = SubString(reg.GetValue(cab, "Name"),3,1)
Return GPSPort
End if
End if
Next
End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing file on device or storage card tsteward Questions (Windows Mobile) 2 11-01-2008 11:32 PM
Find serial number of SD card after formatting Paul Questions (Windows Mobile) 0 10-19-2008 09:43 PM
SD-Card in sleep mode berndgoedecke Questions (Windows Mobile) 0 07-17-2008 06:02 PM
SD Card fix partition table? MM2forever Chit Chat 3 06-07-2008 09:04 AM
Card images Stellaferox Code Samples & Tips 11 02-02-2008 03:44 PM


All times are GMT. The time now is 10:05 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0