Dec 01
来源:双色球大赢家帮助文档


library MZFBFlt;

// ************************************************************************ //
// AppName : 命中分布过滤插件
// Version : 1.0.3
// Company : bittime
// Author : yanxb
// Description: 命中分布过滤插件
// CreateDate : 2003-07-16
// ************************************************************************ //

uses
  SysUtils,
  Classes,
  Windows,
  Forms,
  BaseForm in '..\..\BaseForm.pas' {frmBase},
  MZFBForm in 'MZFBForm.pas' {frmMZFB},
  unt_IniFile in '..\..\unt_IniFile.pas',
  InputForm in '..\..\InputForm.pas' {frmInput},
  Filter_Base in '..\Filter_Base.pas',
  unt_SSQDYJ in '..\..\unt_SSQDYJ.pas',
  unt_CPShareFunc in '..\..\unt_CPShareFunc.pas';

///////////////////////////////////////////////////////////////////
{$R *.res}
///////////////////////////////////////////////////////////////////

var
  FFilterStr: string; //过滤条件字符串
  FCanErrLocal: boolean; //是否本级容错
  FCanErrMin, FCanErrMax: integer; //本级容错范围

///////////////////////////////////////////////////////////////////
// DLL入口函数
// 用户可在该函数中对过滤插件进行初始化处理以及资源释放处理

procedure DLLEntryPoint(dwReason: DWORD);
begin
  case dwReason of
    DLL_PROCESS_ATTACH: //DLL启动
      begin
      //变量初始化等处理
      end;
    DLL_PROCESS_DETACH: //DLL退出
      begin
      //释放资源等处理
      end;
  end;
end;

///////////////////////////////////////////////////////////////////
// 过滤插件信息函数

{ =====================================================================
Function : 获取过滤插件的名称
Result : 过滤插件的名称, 该名称应该不与现有的过滤模块同名
===================================================================== }

function GetFilterName(): PChar; stdcall;
begin
  Result := '分布过滤';
end;

{ =====================================================================
Function : 获取过滤插件的版本信息
Result : 过滤插件的版本信息
===================================================================== }

function GetVersion(): PChar; stdcall;
begin
  Result := '1.0.1';
end;

{ =====================================================================
Function : 获取过滤插件的作者信息
Result : 过滤插件的作者信息
===================================================================== }

function GetAuthor(): PChar; stdcall;
begin
  Result := '比特时代科技有限公司';
end;

///////////////////////////////////////////////////////////////////
// 过滤操作相关函数

{ =====================================================================
Function : 获取过滤插件的过滤条件字符串
Result : 过滤条件字符串
===================================================================== }

function GetFilterStr(): PChar; stdcall;
begin
  Result := PChar(FFilterStr);
end;

{ =====================================================================
Function : 设置过滤插件的过滤条件字符串
Arguments: 过滤条件字符串
===================================================================== }

procedure SetFilterStr(sFilterStr: PChar); stdcall;
begin
  FFilterStr := sFilterStr;
end;

{ =====================================================================
Function : 执行过滤操作,该函数为过滤插件的核心函数,必须实现
Arguments: AChip-要进行过滤的一个单式投注,如:3313011301303
Result : 给定的单式投注不符合的过滤条件个数(即应被过滤的次数)
如单式投注符合所有过滤条件(即应保留)则返回0
===================================================================== }

function SsqExecute(AChip: PChar): integer; stdcall;
begin
  Result := 0;
  //执行过滤操作 to do

  //判断是否本级容错
  if FCanErrLocal then
  begin
    if (Result < FCanErrMin) or (Result > FCanErrMax) then
      Result := 1
    else
      Result := 0;
  end else begin
    if Result >= 1 then Result := 1
    else Result := 0;
  end;
end;

{ =====================================================================
Function : 过滤校验
Arguments: AChip-要进行过滤的一个单式投注,如:3313011301303
Result : 给定的单式投注的过滤校验信息,没条信息间以回车换行(#13#10)
符分隔,如单式投注符合所有过滤条件(即应保留)则返回空
===================================================================== }

function SsqDebug(AChip: PChar; bShowAll: boolean = false): PChar; stdcall;
begin
  Result := '';
  //执行过滤校验操作,返回校验结果 to do
end;

{ =====================================================================
Function : 打开过滤条件设置窗口。
Arguments: no
Result : no
note : 必须在用户确认后及时刷新FFilterStr值
===================================================================== }

function SsqOpen(hApp: Integer = 0): boolean; stdcall;
var
  hOldApp: integer;
  frm: TfrmMZFB;
begin
  hOldApp := Application.Handle;
  Application.Handle := hApp;

  frm := TfrmMZFB.Create(nil);
  frm.SetFilter(FFilterStr);
  frm.ShowModal;
  if not frm.bCancel then
    FFilterStr := frm.GetFilter;
  frm.Free;

  Application.Handle := hOldApp;
  Result := true;
end;

{ =====================================================================
Function : 过滤准备函数,在该函数中可执行过滤条件的优化处理以及过滤
条件的有效性检验
Result : 如过滤条件格式设置正确则返回true,否则返回false
===================================================================== }

function SsqPrepare(): boolean; stdcall;
begin
  //to do
end;

///////////////////////////////////////////////////////////////////
// DLL对外接口函数

exports
  SsqExecute, //过滤处理
  SsqDebug,
  SsqOpen,
  SsqPrepare,
  GetFilterStr,
  SetFilterStr,
  GetFilterName, //获取过滤插件的信息
  GetVersion,
  GetAuthor
  ;

///////////////////////////////////////////////////////////////////

begin
  DLLProc := @DLLEntryPoint;
  DLLEntryPoint(DLL_PROCESS_ATTACH);
end.

written by 彩票过滤 \\ tags: , ,

Nov 28


新增

支持双色球(暂不支持历史数据及遗漏函数)

插件过滤教程

written by 彩票过滤 \\ tags: , , ,