please here is my VB.NET code
Quote:
Imports RIMRADIOCOMLib
Imports System.Runtime.InteropServices
Imports System.Text
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim connection As IConnection = New RIMRadioObj
Dim imei As IReadIMEI = New RIMRadioObj
Dim str As String = ""
connection.Connect("USB", 300, 19000, "")
If connection.GetStatus = ConnectionStatus.CONN_STATUS_CONNECTED Then
imei.Execute(str)
TextBox1.Text = str
Else
TextBox1.Text = "Phone not connected"
End If
End Sub
End Class
|
but i get this error if the device is connected or not
Quote:
Unable to cast COM object of type 'System.__ComObject' to interface type 'RIMRADIOCOMLib.IConnection'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{FE9513A0-9002-11DD-BAEA-0002A5D5C51B}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
|
Please help thanks in advance