uses
Math;procedure StrToBytes(mStr: string; var nBytes: array of Byte);
var
I: Integer;
begin
FillChar(nBytes, SizeOf(nBytes), 0);
for I := Max(0, Low(nBytes)) to Min(Length(mStr) - 1, High(nBytes)) do
nBytes[I] := Ord(mStr[I]);
end; { StrToBytes }procedure TForm1.Button1Click(Sender: TObject);
var
sEnroll1: array[0..239] of Byte;
S: string;
begin
S := '111';
StrToBytes(S, sEnroll1);
end;
Math;procedure StrToBytes(mStr: string; var nBytes: array of Byte);
var
I: Integer;
begin
FillChar(nBytes, SizeOf(nBytes), 0);
for I := Max(0, Low(nBytes)) to Min(Length(mStr) - 1, High(nBytes)) do
nBytes[I] := Ord(mStr[I]);
end; { StrToBytes }procedure TForm1.Button1Click(Sender: TObject);
var
sEnroll1: array[0..239] of Byte;
S: string;
begin
S := '111';
StrToBytes(S, sEnroll1);
end;
解决方案 »
- 一个Zlib老问题了,卡住有段时间了,麻烦达人们帮忙解决.
- 怎么判断text为空?
- 利用wininet.dll实现FTP客户端,与FTP服务器建立连接会话后进行文件传送,在文件传送过程中出现网络异常中断(重启客户端或断开网线),恢
- 如何取到图像文件的分辩率?
- 在线等待-20分求个问题 大家帮忙看看为什么我的Delphi7.0 System页下看属性有FilterComboBox,但是单击System页却看不到,当然就加不到
- 怎么判断窗体已经创建?
- 也是窗口,如何关闭中间层窗口让1,3层照样正常运行
- "class *** not found"运行时的出错信息,真头痛,怎么解决?
- 如此多的高手居然没有人会回答我的问题
- 有没有做物流或商业的大虾???????
- activex for asp组件中可以进行文件读写操作吗?怎样防止冲突!!!
- 窗体上的按钮是谁画的??form 的canves吗??
var
I: Integer;
begin
FillChar(nBytes, SizeOf(nBytes), 0);
for I := Max(0, Low(nBytes)) to Min(Length(mStr) - 1, High(nBytes)) do
nBytes[I] := Ord(mStr[I + 1]);
// ~~~~~
end; { StrToBytes }
begin
sEnroll1[i]:=s[i]
end;