×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    56

    Getting wrong device status (shows phone attached even when it is not)

    Hi,
    I am getting this strange problem with SDK 3.0. I have written a code that checks the device status, its the same code as given in Component Reference Library.
    Though there is no mobile phone attached to my PC but still the result i get is that the phone is attached.
    Following is the code that i have written

    Dim phoneStatus As New PhoneInfo_Suite3
    Dim devStatus As DevNotifyOpt
    Dim connected As Boolean
    phoneStatus.get_DeviceStatus (devStatus)
    Select Case devStatus
    Case ATTACHED
    connected = True
    Case REMOVED
    connected = False
    Case DISCONNECTED
    connected = False
    Case UNKNOWN
    connected = False
    End Select
    IsMobileConnected = connected
    End Function

    Please review it and let me know the problem.

    Regards
    -hammad

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Posts
    590
    Hi,

    The problem is about the calling of the get_DeviceStatus method.
    There are two ways:
    1.
    Call phoneStatus.get_DeviceStatus(devStatus)
    2.
    phoneStatus.get_DeviceStatus devStatus

    If you use the Call keyword to call a procedure that requires arguments, argumentlist must be enclosed in parentheses. If you omit the Call keyword, you also must omit the parentheses around argumentlist.

    Best regards,

    Barna
    Forum Nokia

Posting Permissions

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