写了个检查IP是否合法IP的东东,要的留下Email,写的更好的不要骂我
写了个检查ip是否合法ip的东东,要的留下email,写的更好的不要骂我
我写成了dll(只有几十kb),下面是使用示例:
//
unit unit1;
interface
uses
windows, messages, sysutils, variants, classes, graphics, controls, forms,
dialogs, stdctrls;
type
tform1 = class(tform)
button1: tbutton;
edit1: tedit;
procedure button1click(sender: tobject);
private
{ private declarations }
public
{ public declarations }
end;
var
form1: tform1;
function checkip(const mip: pchar): bool;
implementation
{$r *.dfm}
function checkip; external ipcheck.dll name checkip;
procedure tform1.button1click(sender: tobject);
begin
if checkip(pchar(edit1.text)) then showmessage(ok!)
else showmessage(ip error!);
end;
end.
推荐阅读


讨论区