金笛工业手机论坛  

返回   金笛工业手机论坛 > 开发者乐园 > 短信开发资料

短信开发资料 短信开发技巧,代码分析

 
 
LinkBack 主题工具 显示模式
旧 2010-06-14   #1 (permalink)
初级会员
 
注册日期: 2010-05-31
帖子: 3
donx 正向着好的方向发展
默认 用ASP开发时出现问题

调用组件时总是出错,提示:
错误类型:
Server 对象, ASP 0177 (0x80004002)
不支持此接口
/test1.asp, 第 25 行


response.buffer=true
dim objSMS
dim lngRes,strNO,strCON,strMsgCenter
strNO=13911111111
strCON=request.Form("txtContent")
if strNo="" then
response.Write "<script>alert('请入接收号码');window.history.back();</script>"
response.End
end if
set SMS=Server.CreateObject("JinDi.SmsControl")//这就是第25行
'设置串口号
objSMS.CommPort=1
'打开设备
lngRes=objSMS.OpenComm
if lngRes=0 then
response.Write "打开设备成功<br>"
else
response.Write "打开设备失败<br>"
end if
response.Flush
'设置短信中心,只需在SIM卡第一次使用时设置,以后不用再设,此处仅作示例
strMsgCenter="+8613800755500" '请改为当地的短信中心号码
lngRes=objSMS.SetMsgCenterNo(strMsgCenter)
if lngRes=0 then
response.Write "短信中心设置成功<br>"
else
response.Write "短信中心设置失败<br>"
end if
response.Flush
'发送短信
lngRes=objSMS.SendMsg(strNO,strCON)
if lngRes=0 then
response.Write "短信发送成功<br>"
else
response.Write "短信发送失败<br>"
end if
response.Write "'>返回</a>"
response.Flush
objSMS.CloseComm
set objSMS=nothing
donx 当前离线   回复时引用此帖
 

书签


当前查看此主题的会员: 5 (0 位会员和 5 位游客)
 

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码
Trackbacks are 启用
Pingbacks are 启用
Refbacks are 启用



所有时间均为北京时间。现在的时间是 10:56


Powered by vBulletin® 版本 3.8.3
版权所有 ©2000 - 2024,Jelsoft Enterprises Ltd.