📄 testcrc.pas
字号:
unit TestCRC;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
function CRC16(sndStr:string;iLen:integer):WORD;stdcall; external 'dllCRC16.dll';
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
VAR
strTst:string;
begin
//strTst := chr(170) + chr(255) + chr(255) + chr(255) +chr(12) + chr(61) + chr(10) + chr(12) + chr(34) + chr(0) + chr(0) + chr(1);
strTst := chr($09) + chr($61) + chr($10)+ chr($12) + chr($34) +chr($0) + chr($0) + chr($01);
label1.Caption := inttohex(Crc16(strTst,8),2);
//copyfile(pchar('newfile.txt'),pchar('//computername/direction/targer.txt'),false);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -