Scan for presence of GPS card

Discussion in 'Code Samples & Tips' started by alfcen, May 26, 2007.

  1. alfcen

    alfcen Well-Known Member Licensed User

    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
    key = "Drivers\Active\"
    v = i + 1
    For i = v to 99
    cab=key & Format(i,"D2")
    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
    End Sub
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice