关于手机短信息发送 (5分)

L

laijf

Unregistered / Unconfirmed
GUEST, unregistred user!
小弟暂时没有分能送,希望大家能自愿帮助小弟一把,也希望大家都说两句不一定非要能行
struct bind_mess{ //头文件中定义的
unsigned int mess_len;
unsigned int command_id;
unsigned int sequ_num;
unsigned int time_data;
unsigned int record_num;
BYTE connec_type;
char username[16];
char password[16];
char reserver[8];
};

CPP文件中的发送函数
int TForm1::bind_connect(unsigned int sum_count,bind_mess bindip,unsigned id,AnsiString user_name,AnsiString pwd)
{
AnsiString sj=FormatDateTime("mmddhhmmss", Now());
bindip.mess_len=htonl(61);//message length消息体总长度(字节)
bindip.command_id=htonl(0x1);//命令ID
bindip.sequ_num=htonl(id);
bindip.time_data=htonl(sj.ToInt());
bindip.record_num=htonl(sum_count++);
bindip.connec_type=1;//SP send message to SMG.
StrCopy(bindip.username, user_name.c_str());
StrCopy(bindip.password,pwd.c_str());
StrCopy(bindip.reserver,"");
int fs=0;
try
{
while(!fs)
fs=ClientSocket1->Socket->SendBuf(&bindip,61);
if(fs>0)
return 1;
else
return 0;
}
catch(...)
{
//error
return 0;
}
}
 
你好,我也在和你做同样的工作,不过你好象是用的C++,我用的delphi,有什么问题我们可以一起探讨。
 
那你把你的邮箱留下呀?
我的是QQ24443686
邮箱LAIJF2001@HOTMAIL.COM
 
我也在做,也用DELPHI,详见:http://www.delphibbs.com/delphibbs/dispq.asp?lid=1328104
我的EMAIL:wilson_z1988@sohu.com

To:lionfenn
你的联系方式是什么?
 
不知道,说的是什么问题!
 
补充C++转成DELPHI怎么写
 
多人接受答案了。
 
顶部