Форум: "Начинающим";
Текущий архив: 2005.10.09;
Скачать: [xml.tar.bz2];
Внизвесьма хитраяситуация... именно так, без пробелов Найти похожие ветки
← →
Dust © (2005-08-29 15:50) [0]есть объект SMSPPclient
есть события генерируемые этим объектом, а именно:
OnReceiveShortSMS,
OnReceiveLongSMS,
OnReceivePartSMS,
из обработчиков можеты быть вызван, а точнее обязательно будет вызван метод SendSMS, трабла заключается в том, что необходимо послать resp пакет, до вызова этого метода с кодом, который должен вернуть обработчик пакета
итак код:....
type
Trcv_short_SMSEvent = procedure(const smska : pData_from_deliver_sm; obj : TObject; var resp_code);
type
Trcv_long_SMSEvent = procedure(const smska : pTLongSMS; obj : TObject; var resp_code);
.....
...
property OnReceive_Short_SMS : Trcv_short_SMSEvent read FReceive_Short_SMS write FReceive_Short_SMS;
property OnReceive_Part_SMS : Trcv_short_SMSEvent read FReceive_Part_SMS write FReceive_Part_SMS;
property OnReceive_Long_SMS : Trcv_long_SMSEvent read FReceive_long_SMS write FReceive_long_SMS;
.....
....
if (not (data_from_dlvr_sm.ISpart)) and (data_from_dlvr_sm.shrtSMS <>nil) then
if Assigned (FReceive_Short_SMS) then
OnReceive_Short_SMS (data_from_dlvr_sm.shrtSMS, Self);
if data_from_dlvr_sm.ISpart and (data_from_dlvr_sm.shrtSMS <>nil) then
if Assigned (FReceive_Part_SMS) then OnReceive_Part_SMS (data_from_dlvr_sm.shrtSMS, Self);
if data_from_dlvr_sm.ISfull and (data_from_dlvr_sm.plngSMS<>nil) then
if Assigned (FReceive_long_SMS) then OnReceive_Long_SMS (data_from_dlvr_sm.plngSMS, Self);
if data_from_dlvr_sm.ISfull then
SMS.FreeMemAfterRcv();
pack_lng :=4*1024;
packet_to_Out := AllocMem(pack_lng);
pack_lng := Asm_submit_sm_resp(DWORD(packet_to_Out), pack_lng);
ClientSocket.SendBuf(packet_to_Out^,pack_lng);
FreeMemory (packet_to_Out);
Вызывать метод SendSMS до посыла пакета с recp_code нельзя...
Подскажите как быть?
← →
Dust © (2005-08-29 15:53) [1]точнее вот так:
OnReceive_Short_SMS (data_from_dlvr_sm.shrtSMS, Self, , resp_code);
OnReceive_Part_SMS (data_from_dlvr_sm.shrtSMS, Self, , resp_code);
OnReceive_Long_SMS (data_from_dlvr_sm.plngSMS, Self, resp_code);
Asm_submit_sm_resp(DWORD(packet_to_Out), pack_lng, resp_code);
← →
Digitman © (2005-08-30 08:28) [2]
> необходимо послать resp пакет
ну ты же и посылаешь его в строке
ClientSocket.SendBuf(packet_to_Out^,pack_lng);
в чем проблема-то ?
непонятно ...
Страницы: 1 вся ветка
Форум: "Начинающим";
Текущий архив: 2005.10.09;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.015 c