📄 serverunit2.pas
字号:
unit ServerUnit2;
{$WARN SYMBOL_PLATFORM OFF}
interface
uses
ComObj, ActiveX, Server_TLB, StdVcl, ServerUnit1;
type
TDCOMServer = class(TAutoObject, IDCOMServer)
protected
//口令认证服务程序
function Confirm(const sName, sPassword: WideString): WordBool; safecall;
{ Protected declarations }
end;
implementation
uses ComServ;
function TDCOMServer.Confirm(const sName, sPassword: WideString): WordBool;
begin
if (sName = 'dcom') and (sPassword = 'speed') then
begin
//登陆成功
Result := true;
Form1.Label1.Caption := '已经受理客户登陆!';
end
else
Result := false;
end;
initialization
TAutoObjectFactory.Create(ComServer, TDCOMServer, Class_DCOMServer,
ciMultiInstance, tmApartment);
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -