View Single Post
Old 08-23-2011, 02:06   #82 (permalink)
seifhatem
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
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
  Reply With Quote
 
Page generated in 0.07014 seconds with 7 queries