delphi中用DLL封装WEBSERVICE接口 老是报内存错误,望高手指教
librarySendMsg;usesSysUtils,Classes,Dialogs,smsin'sms.pas',DMin'DM.pas'{DataModule1:T...
library SendMsg;
uses
SysUtils,
Classes,
Dialogs,
sms in 'sms.pas',
DM in 'DM.pas' {DataModule1: TDataModule};
{$R *.res}
function MsgSend(const userID: WideString; const account: WideString;
const password: WideString; const phones: WideString;
const content: WideString; const sendTime: WideString;
const sendType: Integer; const postFixNumber: WideString;
const sign: Integer):integer;stdcall;
var
sSendStatus: SendStatus;
aInfo: smsPortType;
begin
aInfo := DataModule1.HTTPRIO2 as smsPortType;
try
sSendStatus := aInfo.directSend(userID,account,password,phones,content,sendTime,sendType,postFixNumber,sign); //这里出错
finally
Result:= sSendStatus.OKPhoneCounts;
aInfo := nil;
end;
end;
exports
MsgSend name 'MsgSend',
GetStockDetails name 'GetStockDetails';
begin
end.
initialization
coinitialize(nil);
finalization
counInitializ; 展开
uses
SysUtils,
Classes,
Dialogs,
sms in 'sms.pas',
DM in 'DM.pas' {DataModule1: TDataModule};
{$R *.res}
function MsgSend(const userID: WideString; const account: WideString;
const password: WideString; const phones: WideString;
const content: WideString; const sendTime: WideString;
const sendType: Integer; const postFixNumber: WideString;
const sign: Integer):integer;stdcall;
var
sSendStatus: SendStatus;
aInfo: smsPortType;
begin
aInfo := DataModule1.HTTPRIO2 as smsPortType;
try
sSendStatus := aInfo.directSend(userID,account,password,phones,content,sendTime,sendType,postFixNumber,sign); //这里出错
finally
Result:= sSendStatus.OKPhoneCounts;
aInfo := nil;
end;
end;
exports
MsgSend name 'MsgSend',
GetStockDetails name 'GetStockDetails';
begin
end.
initialization
coinitialize(nil);
finalization
counInitializ; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询