在palm os4上面调用telephone library打电话
2005-12-06 20:59
141 查看
程序系Hand-Held Basic ++ 1.05源代码
Private Const sysLibTrapBase as Long = &HA800
Private Const sysLibTrapName as Long = &HA800
Private Const sysLibTrapOpen as Long = &HA801
Private Const sysLibTrapClose as Long = &HA802
Private Const sysLibTrapSleep as Long = &HA803
Private Const sysLibTrapWake as Long = &HA804
Private Const sysLibTrapCustom as Long = &HA805
Public Declare Function TelOpen(ByVal refnum as Integer, Byval vernum as Long, Byref appid as Long) as Integer Trap sysLibTrapOpen
Public Declare Function TelClose (ByVal refnum as Integer, Byval appid as Long) as Integer Trap sysLibTrapClose
Public Declare Function TelSpcCallNumber(Byval refnum as Integer, Byval appid as Long, Byval dialnumber as String, byref transid as Integer) as Integer Trap &HA842
Public Declare Function TelSpcCloseLine(byval refnum as Integer, byval appid as Long, byval lineid as Integer, byref transid as Integer) as Integer Trap &HA843
Public Declare Sub WinDrawPixel(ByVal x as Integer, ByVal y as Integer) Trap &HA383
Public Declare Sub WinGetPixelRGB(ByVal x as Integer, ByVal y as Integer, ByRef rgb as Long) Trap &HA3EB
Public Declare Function WinSetDrawWindow(ByVal hWin as Long) As Pointer Trap &HA1FD
Public lappid as Long
Public iRefNum as integer
Public tranid as Integer
Public Sub TelInit()
Dim e as Integer
On error goto Err_MLInit
' Load MathLib, obtain a reference number
' and initialize the library
iRefNum=LoadLibrary("PhoneLib.lib","libr", "tmgr")
e=TelOpen(iRefNum,16982016,lappid)
If e<>0 Then Err.Raise 67
Exit Sub
Err_MLInit:
MsgBox "Error # " & Err.Number & "/n" & Err.Description
App.Quit
End Sub
'---------------------------- Close the library ----------------
Public Sub TelTermin()
Dim e as Integer, u as Integer
' If the library was opened and is no longer
' used, unload it
If iRefNum<>0 Then
e=TelClose(iRefNum,lappid)
'u contains the number of other applications using the library
'If e<>63 Then RemoveLibrary(iRefNum)
End If
End Sub
Public Sub SpeechDial()
Dim e as Integer
e=TelSpcCallNumber(iRefNum,lappid,"1860",tranid)
msgbox cstr(e)
End Sub
Public Sub CloseDial()
Dim e as Integer
e=TelSpcCloseLine(iRefNum,lappid,0,tranid)
msgbox cstr(e)
End Sub
Private Const sysLibTrapBase as Long = &HA800
Private Const sysLibTrapName as Long = &HA800
Private Const sysLibTrapOpen as Long = &HA801
Private Const sysLibTrapClose as Long = &HA802
Private Const sysLibTrapSleep as Long = &HA803
Private Const sysLibTrapWake as Long = &HA804
Private Const sysLibTrapCustom as Long = &HA805
Public Declare Function TelOpen(ByVal refnum as Integer, Byval vernum as Long, Byref appid as Long) as Integer Trap sysLibTrapOpen
Public Declare Function TelClose (ByVal refnum as Integer, Byval appid as Long) as Integer Trap sysLibTrapClose
Public Declare Function TelSpcCallNumber(Byval refnum as Integer, Byval appid as Long, Byval dialnumber as String, byref transid as Integer) as Integer Trap &HA842
Public Declare Function TelSpcCloseLine(byval refnum as Integer, byval appid as Long, byval lineid as Integer, byref transid as Integer) as Integer Trap &HA843
Public Declare Sub WinDrawPixel(ByVal x as Integer, ByVal y as Integer) Trap &HA383
Public Declare Sub WinGetPixelRGB(ByVal x as Integer, ByVal y as Integer, ByRef rgb as Long) Trap &HA3EB
Public Declare Function WinSetDrawWindow(ByVal hWin as Long) As Pointer Trap &HA1FD
Public lappid as Long
Public iRefNum as integer
Public tranid as Integer
Public Sub TelInit()
Dim e as Integer
On error goto Err_MLInit
' Load MathLib, obtain a reference number
' and initialize the library
iRefNum=LoadLibrary("PhoneLib.lib","libr", "tmgr")
e=TelOpen(iRefNum,16982016,lappid)
If e<>0 Then Err.Raise 67
Exit Sub
Err_MLInit:
MsgBox "Error # " & Err.Number & "/n" & Err.Description
App.Quit
End Sub
'---------------------------- Close the library ----------------
Public Sub TelTermin()
Dim e as Integer, u as Integer
' If the library was opened and is no longer
' used, unload it
If iRefNum<>0 Then
e=TelClose(iRefNum,lappid)
'u contains the number of other applications using the library
'If e<>63 Then RemoveLibrary(iRefNum)
End If
End Sub
Public Sub SpeechDial()
Dim e as Integer
e=TelSpcCallNumber(iRefNum,lappid,"1860",tranid)
msgbox cstr(e)
End Sub
Public Sub CloseDial()
Dim e as Integer
e=TelSpcCloseLine(iRefNum,lappid,0,tranid)
msgbox cstr(e)
End Sub
相关文章推荐
- IOS问题汇总:2015-1-9 iOS 调用系统发短信以及打电话功能
- 调用系统摄像头拍照,对拍照后的图片进行裁剪和压缩处理,并显示在imageview上面
- ios-王云鹤 调用ios系统功能---------------打电话、发短信、发邮件
- iOS 开发之 调用打电话功能
- JavaScript调用App原生代码(iOS、Android)通用解决方案 实际场景 场景:现在有一个H5活动页面,上面有一个登陆按钮,要求点击登陆按钮以后,唤出App内部的登录界面,当登录成功
- swift--调用系统单例实现打电话
- IOS 开发,调用打电话,发短信,打开网址
- iOS开发~调用系统发短信以及打电话的功能
- IOS 开发,调用打电话,发短信,打开网址
- iOS开发 调用系统发短信 打电话 功能
- Hello Android - 调用打电话和发短信及intent一些其他用法
- 调用上面的@InitBinder 解决客户端上传时间参数转换的问题
- iOS开发之调用系统打电话发短信接口以及程序内发短信
- ionic 调用手机的打电话功能
- iOS-----打电话,调用打电话,发短信,打开网址NSURL *url = [[NSURL alloc] initWithString:[NSString stringWithFormat:@"t
- ios 调用打电话,发短信的功能
- IOS 开发,调用打电话,发短信,打开网址(转自 破冰)
- iOS 调用系统发短信以及打电话功能
- android之调用系统打电话与发短信界面
- html5页面调用手机打电话功能