求 delphi webserivice 调用例子
求 delphi webserivice 调用例子
服务端编写:新建"WebServices-->SOAP Server Application-->ISAPI/NSAPI Dynamic Link Library","Service name"填写你要的服务名,如"SendSmsServices",然后在SendSmsServiceIntf.pas中添加接口函数:
Delphi(Pascal) code:
{ Invokable interface ISendSmsService }
unit SendSmsServiceIntf;
interface
uses InvokeRegistry, Types, XSBuiltIns;
type
{ Invokable interfaces must derive from IInvokable }
ISendSmsService = interface(IInvokable)
['{2DE80373-26E4-49B6-86E1-DC67D456FB90}']
{ Methods of Invokable interface must not use the default }
{ calling convention; stdcall is recommended }
function sendSms(const sendSms1: widestring): widestring; stdcall;
end;
implementation
initialization
{ Invokable interfaces must be registered }
InvRegistry.RegisterInterface(TypeInfo(ISendSmsService));
end.
在SendSmsServiceImpl.pas中写具体的处理过程
Delphi(Pascal) code:
{ Invokable implementation File for TSendSmsService which implements ISendSmsService }
unit SendSmsServiceImpl;
interface
uses InvokeRegistry, Types, XSBuiltIns, SendSmsServiceIntf;
type
{ TSendSmsService }
TSendSmsService = c
相关问答:
原文地址:http://hi.baidu.com/sqldebug/blog/item/8e2749213082c0589922ed61.html
直接贴过来的,有点乱,大家凑合看。
一、服务程序和桌面程序的区别
Windows 2000/XP/2003等支持一种叫做“ ......
原文地址:http://hi.baidu.com/sqldebug/blog/item/58a764624a44d74eeaf8f863.html
一、如何限制系统服务和桌面程序只运行一个
如何限制系统服务和桌面程序只运行一个
在工程加入下列代码可以 ......