短消息结构SM_PARAM:
VC++:
// 短消息参数结构,编码/解码共用
// 其中,字符串以0结尾
typedef struct {
char SCA[16]; // 短消息服务中心号码(SMSC地址)
char TPA[16]; // 目标号码或回复号码(TP-DA或TP-RA)
char TP_PID; // 用户信息协议标识(TP-PID)
char TP_DCS; // 用户信息编码方式(TP-DCS)
char TP_SCTS[16]; // 服务时间戳字符串(TP_SCTS), 接收时用到
char TP_UD[161]; // 原始用户信息(编码前或解码后的TP-UD)
char index; // 短消息序号,在读取时用到
} SM_PARAM;Delphi:
type SM_PARAM = record
SCA:Array[0..15] of char; // 短消息服务中心号码(SMSC地址)
TPA:Array[0..15] of char; // 目标号码或回复号码(TP-DA或TP-RA)
TP_PID:Byte; //用户信息协议标识(TP-PID)
TP_DCS:Byte; // 用户信息编码方式(TP-DCS)
TP_SCTS:Array[0..15] of char]; // 服务时间戳字符串(TP_SCTS), 接收时用到
TP_UD:Array[0..160] of char; // 原始用户信息(编码前或解码后的TP-UD)
index:Array[0..2] of char; // 短消息序号,在读取时用到
end;VC++:
int SendShortMessage(const char* send_number,const char* send_msg,SM_PARAM *sm_param_temp)delphi:
(1)
function SendShortMessage(const send_number:PChar; const send_msg:Pchar; sm_param_temp:SM_PARAM):Integer; stdcall;external 'smspdu.dll' name 'SendShortMessage';(2)产品商提供
function SendShortMessage(send_number:PChar;send_msg:Pchar;sm_param_temp:^SM_PARAM):bool ;stdcall;external ' smspdu.dll ' name 'SendShortMessage';(1)编译过得去,可执行出错
(2)编译过不去是我改的不对吗,还是别的问题?望高人指教!
VC++:
// 短消息参数结构,编码/解码共用
// 其中,字符串以0结尾
typedef struct {
char SCA[16]; // 短消息服务中心号码(SMSC地址)
char TPA[16]; // 目标号码或回复号码(TP-DA或TP-RA)
char TP_PID; // 用户信息协议标识(TP-PID)
char TP_DCS; // 用户信息编码方式(TP-DCS)
char TP_SCTS[16]; // 服务时间戳字符串(TP_SCTS), 接收时用到
char TP_UD[161]; // 原始用户信息(编码前或解码后的TP-UD)
char index; // 短消息序号,在读取时用到
} SM_PARAM;Delphi:
type SM_PARAM = record
SCA:Array[0..15] of char; // 短消息服务中心号码(SMSC地址)
TPA:Array[0..15] of char; // 目标号码或回复号码(TP-DA或TP-RA)
TP_PID:Byte; //用户信息协议标识(TP-PID)
TP_DCS:Byte; // 用户信息编码方式(TP-DCS)
TP_SCTS:Array[0..15] of char]; // 服务时间戳字符串(TP_SCTS), 接收时用到
TP_UD:Array[0..160] of char; // 原始用户信息(编码前或解码后的TP-UD)
index:Array[0..2] of char; // 短消息序号,在读取时用到
end;VC++:
int SendShortMessage(const char* send_number,const char* send_msg,SM_PARAM *sm_param_temp)delphi:
(1)
function SendShortMessage(const send_number:PChar; const send_msg:Pchar; sm_param_temp:SM_PARAM):Integer; stdcall;external 'smspdu.dll' name 'SendShortMessage';(2)产品商提供
function SendShortMessage(send_number:PChar;send_msg:Pchar;sm_param_temp:^SM_PARAM):bool ;stdcall;external ' smspdu.dll ' name 'SendShortMessage';(1)编译过得去,可执行出错
(2)编译过不去是我改的不对吗,还是别的问题?望高人指教!
SCA:Array[0..15] of char; // 短消息服务中心号码(SMSC地址)
TPA:Array[0..15] of char; // 目标号码或回复号码(TP-DA或TP-RA)
TP_PID:Byte; //用户信息协议标识(TP-PID)
TP_DCS:Byte; // 用户信息编码方式(TP-DCS)
TP_SCTS:Array[0..15] of char]; // 服务时间戳字符串(TP_SCTS), 接收时用到
TP_UD: Array[0..160] of char; // 原始用户信息(编码前或解码后的TP-UD)
index: char; // 短消息序号,在读取时用到
end;