Sapphire SIM utility給Visual Studio開發(fā)者提供了管理SIM卡的功能,SIM卡包括Pocket PC Phone 版本或者智能電話設備。用戶可以在SIM卡的一般或者固定撥號區(qū)域內添加、修改和刪除聯(lián)系人。它還可以發(fā)起一個電話呼叫,并可以開啟/關閉撥號特性。
The Sapphire SIM utility provides the Visual Studio developer with the ability to manage the SIM card of a Pocket PC Phone Edition or Smartphone device. It enables the user to add, change and delete contacts from the normal and fixed dialling areas of the SIM card. The utility can also initiate a phone call and enable or disable the fixed dialling features.
產(chǎn)品特征Sapphire Sim Utility具備以下特征使得SIM卡的管理變得簡易簡單:
- 發(fā)起呼叫
- 往SIM卡上添加聯(lián)系人
- 更新SIM卡上的聯(lián)系人
- 刪除SIN卡上的聯(lián)系人
- 開啟/關閉固定號碼撥號
- 輸入PIN和PIN2碼
實例代碼 - 該操作是如此簡單的,您只需在您的程序中聲明相應的DLL函數(shù)即可,就像在用戶的應用程序之內的功能;呼叫它就像用戶自己寫入一樣。如下是一個演示實例,它展示了如何發(fā)起呼叫、如何列出SIM卡的電話號碼表以及如何存儲電話號碼。
Public Sub MakeCall(ByVal sPhoneNumber As String)
SIMMakeCall(sPhoneNumber, SapphireSIMLicence)
End Sub
Public Sub ListPhoneNumbers(ByRef iEntries As Integer, _ByVal iLocation As Integer, _ByRef sPhoneNames As String, _ByRef sPhoneNumbers As String)
Dim sListPhoneNames As String
Dim sListPhoneNumbers As String sListPhoneNames = Space(1024)
sListPhoneNumbers = Space(1024)
sSIMListPhoneNumbers(iEntries, _iLocation, _sListPhoneNames, _sListPhoneNumbers, _SapphireSIMLicence)
sPhoneNames = StripString(sListPhoneNames)
sPhoneNumbers = StripString(sListPhoneNumbers)
End
Sub Public Sub WritePhoneNumber(ByVal iIndex As Integer, _ByVal iLocation As Integer, _ByVal sPhoneName As String, _ByVal sPhoneNumber As String)
UnlockPIN("123456", "")
sSIMWritePhoneNumber(iIndex, _iLocation, _sPhoneName, _sPhoneNumber, _SapphireSIMLicence)
End Sub
Product Features
The Sapphire Sim Utility makes SIM card management easy with the following features:
- Make a phone call
- Add a contact to the SIM card
- Update a contact on the SIM card
- Delete a contract form the SIM card
- Enable or disable fixed dialling
- Enter PIN and PIN2 numbers
Sample Code
- Implementation couldn’t be easier, simply declare the DLL function as a function within your application and call it as though you wrote it yourself. Here’s a sample demo to show how to make a call, list the SIM card phone numbers and to store a phone number.
Public Sub MakeCall(ByVal sPhoneNumber As String)
SIMMakeCall(sPhoneNumber, SapphireSIMLicence)
End Sub
Public Sub ListPhoneNumbers(ByRef iEntries As Integer, _ByVal iLocation As Integer, _ByRef sPhoneNames As String, _ByRef sPhoneNumbers As String)
Dim sListPhoneNames As String
Dim sListPhoneNumbers As String sListPhoneNames = Space(1024)
sListPhoneNumbers = Space(1024)
sSIMListPhoneNumbers(iEntries, _iLocation, _sListPhoneNames, _sListPhoneNumbers, _SapphireSIMLicence)
sPhoneNames = StripString(sListPhoneNames)
sPhoneNumbers = StripString(sListPhoneNumbers)
End
Sub Public Sub WritePhoneNumber(ByVal iIndex As Integer, _ByVal iLocation As Integer, _ByVal sPhoneName As String, _ByVal sPhoneNumber As String)
UnlockPIN("123456", "")
sSIMWritePhoneNumber(iIndex, _iLocation, _sPhoneName, _sPhoneNumber, _SapphireSIMLicence)
End Sub