hrhgsmd.pas

来自「CDMA modem动态链接库的设计与开发」· PAS 代码 · 共 45 行

PAS
45
字号
unit HRHGSMD;

interface

Type
  TFNHookSMSText = Procedure (phone,msg: PWideChar; Data:Pointer; nData: Integer); stdcall;
  TFNHookSMSNotify = Procedure (msg: PWideChar; Data:Pointer; nData: Integer); stdcall;
{ 回掉函数C++定义参考
  typedef void (WINAPI *TFNHookSMSText)( PWSTR, PWSTR,PVOID*,DWORD);
  typedef void (WINAPI *TFNHookSMSNotify)(PWSTR,PVOID*,DWORD);
}
Procedure GSMStartUp ; Stdcall ;
procedure GSMCleanUp ; Stdcall ;

Function GSMConnect(CommNo:Integer):Boolean ; Stdcall ;
Function GSMDisconnect:Boolean ; Stdcall ;
Function SetSMSCentre(SMSCentre :PWideChar): Boolean ; Stdcall ;
Function SendSMSText(Phone,Msg: PWideChar): Boolean ; Stdcall ;
function SendSMSData(Phone: PWideChar; Data: Pointer; nData: Integer): Boolean ; stdcall ;
Function QueryWorking: Integer ; Stdcall ; 
Function QueryVersionInfo(Info : PWideChar; nMaxCount:Integer):Integer ;Stdcall ;

function HookSMSText(fnSMSText:TFNHookSMSText):TFNHookSMSText; stdcall ;
function HookSMSNotify(fnSMSNotify:TFNHookSMSNotify):TFNHookSMSNotify; stdcall ;

implementation
CONST
  GSMDLL='HRHGSM.DLL';

Procedure GSMStartUp ; external GSMDLL ;
procedure GSMCleanUp ; external GSMDLL ;

Function GSMConnect(CommNo:Integer):Boolean ; external GSMDLL ;
Function GSMDisconnect:Boolean ; external GSMDLL ;
Function SetSMSCentre(SMSCentre :PWideChar): Boolean ; external GSMDLL ;
Function SendSMSText(Phone,Msg: PWideChar): Boolean ; external GSMDLL ;
function SendSMSData(Phone: PWideChar; Data: Pointer; nData: Integer): Boolean ; external GSMDLL;
Function QueryWorking: Integer ; external GSMDLL ;
Function QueryVersionInfo(Info : PWideChar; nMaxCount:Integer):Integer ;external GSMDLL ;

function HookSMSText(fnSMSText:TFNHookSMSText):TFNHookSMSText; external GSMDLL ;
function HookSMSNotify(fnSMSNotify:TFNHookSMSNotify):TFNHookSMSNotify; external GSMDLL ;

end.
 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?