将IHTMLDocument2设置为nil(或FreeAndNil)会导致访问冲突

时间:2015-07-01 19:51:44

标签: delphi ihtmldocument2

我有一个使用IHTMLDocument2来处理html的系统收到了一个idhttp,到目前为止一直很好,这个问题取决于windows +版本的Internet Explorer +其他一些尚未弄清楚的细节,因为有些错误我不明白为什么会发生。 例如,我也创建:

var
  IDoc : IHTMLDocument2;
begin
  IDoc := CreateComObject(Class_HTMLDOcument) as IHTMLDocument2;
  //work html...
end;

问题出在最后,看看表格和错误, 如果我这样做:

IDoc := nil;

收到错误

Access violation at address 000007FEE4CFF3E1 in module 'jscript9.dll'.
Read of address FFFFFFFFFFFFFF..

取消IDoc时不会发生此错误,但稍后(不确切知道何时,不查看调试)

如果我这样做:

FreeAndNil(Idoc);

收到错误

Access violation at address 0000000000000000 in module 'Program.exe'.
Execution of address 0000000000000000

此错误已经恰好发生在此时。

如果我什么都不做,或者:= nil或FreeAndNil()。我也有dll'jscript9.dll'的错误

问题是,在某些机器以某种方式工作而其他机器以其他方式工作,我有两个具有相同配置和相同版本的Internet Explorer的窗口,其中一台机器必须使用“IDoc:= nil;”和其他“FreeAndNil(IDOC)”正常运行而没有错误,想知道为什么会发生这种情况,因为他想要遵循任何版本的Windows和Internet Explorer的工作模式。

测试单位:

unit F_Prin;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, comObj, Vcl.StdCtrls, mshtml, Winapi.ActiveX,
  Vcl.Grids;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    RadioButton3: TRadioButton;
    StringGrid1: TStringGrid;
    Button2: TButton;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
    function pegaConteudoFuncaoJS(str, nomeFunc : String) : String;
    function URLEncodeMj(s : String) : String;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

function URLEncode(const ASrc: string): string;
var
  i: Integer;
const
  UnsafeChars = ['*', '#', '%', '<', '>', ' ','[',']'];  {do not localize}
begin
  Result := '';    {Do not Localize}
  for i := 1 to Length(ASrc) do
  begin
    if (ASrc[i] in UnsafeChars) or (not (ord(ASrc[i])in [33..128])) then
    begin {do not localize}
      Result := Result + '%' + IntToHex(Ord(ASrc[i]), 2);  {do not localize}
    end
    else
    begin
      Result := Result + ASrc[i];
    end;
  end;
end;


function TForm1.URLEncodeMj(s : String) : String;
begin
  Result := UrlEncode(s);
  Result := StringReplace(Result, '&amp;', '&', [rfReplaceAll]);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  StringGrid1.ColCount := 1;
  StringGrid1.RowCount := 1;
end;

procedure TForm1.Button3Click(Sender: TObject);
const
  IEversion : Integer = 9; //get ie version
var
 ovTable, v : OleVariant;
 i, j, q, ncol,
 nrow : Integer;
 mat : Array of Array of String;
 sTemp : String;
 bTemReg, bSai : Boolean;
 //WBT : TWebBrowser;
 IDoc2 : IHTMLDocument2;
begin

 ncol := 0;
 nrow := 0;
 bTemReg := False;
 i := 0;
 j := 0;
 q := 0;
 bSai := False;

try
 IDoc2 := CreateComObject(Class_HTMLDOcument) as IHTMLDocument2;
 IDoc2.designMode := 'on';

 if IEversion < 9 then
  while IDoc2.readyState <> 'complete' do
     Application.ProcessMessages;

 v := VarArrayCreate([0, 0], VarVariant);
 v[0] := memo1.Text;
 IDoc2.Write(PSafeArray(System.TVarData(v).VArray));
 IDoc2.designMode := 'off';

 if IEversion < 9 then
  while IDoc2.readyState <> 'complete' do
     Application.ProcessMessages;

 for q := 0 to (IDoc2.all.tags('TABLE') as IHTMLElementCollection).Length -1 do
    begin
      ovTable := (IDoc2.all.tags('TABLE') as IHTMLElementCollection).item(q, 0);

      for i := 0 to (ovTable.Rows.Length - 1) do
        begin
          for j := 0 to (ovTable.Rows.Item(i).Cells.Length - 1) do
            begin
              sTemp := TrimRight(TrimLeft(ovTable.Rows.Item(I).Cells.Item(J).InnerText));
              if (sTemp = 'Prova') = true then
                 begin
                  bSai := True;
                  Break;
                 end;
            end;
            if bSai = True then
              Break;
        end;
      if bSai = True then
        Break;
    end;

if bSai = False then //não achou...
   begin
    if RadioButton2.Checked = True then
       FreeAndNil(IDoc2);

    if RadioButton1.Checked = True then
       IDoc2 := Nil;

     Exit;
   end;

  if RadioButton2.Checked = True then
     FreeAndNil(IDoc2);

  if RadioButton1.Checked = True then
     IDoc2 := Nil;

  nrow := ovTable.Rows.Length;
  StringGrid1.RowCount := nrow;
  SetLength(mat, nrow);

  ncol := 7;
  StringGrid1.ColCount := ncol+1;
  for I := 0 to nrow - 1 do
     SetLength(mat[I], ncol+1);

for I := 0 to (nrow - 1) do
  begin
   if I = 0 then //linha 0 = nome dos campos
      begin
        sTemp := 'Lances';
        mat[I, 0] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(1).InnerText;
        mat[I, 1] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(2).InnerText;
        mat[I, 2] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(3).InnerText;
        mat[I, 3] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(4).InnerText;
        mat[I, 4] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(5).InnerText;
        mat[I, 5] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(6).InnerText;
        mat[I, 6] := sTemp;
        sTemp := 'link person';
        mat[I, 7] := sTemp;
      end
    else
      begin
        sTemp := ovTable.Rows.Item(I).Cells.Item(0).InnerText;
        mat[I, 0] := sTemp;
        if ovTable.Rows.Item(I).Cells.Length > 1 then //tem registros
           begin
            bTemReg := True;
            sTemp := ovTable.Rows.Item(I).Cells.Item(1).InnerText;
            mat[I, 1] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(2).InnerText;
            mat[I, 2] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(3).InnerText;
            mat[I, 3] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(4).InnerText;
            mat[I, 4] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(5).InnerText;
            mat[I, 5] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(6).InnerText;
            mat[I, 6] := sTemp;

           sTemp := ovTable.Rows.Item(I).Cells.Item(0).InnerHtml;
           sTemp := pegaConteudoFuncaoJS(sTemp, 'window.open');
           sTemp := Copy(sTemp, 0, Pos(',', sTemp)-1);
           sTemp := sTemp.Replace('''', '', [rfReplaceAll]);
           sTemp := URLEncodeMj(sTemp);
           mat[I, 7] := sTemp;
           end;
      end;//end if linha = 0
  end;//end for I (geral)


 for I := 0 to (nrow - 1) do
   begin
    for J := 0 to (Length(mat[I]) - 1) do
      Begin
       StringGrid1.Cells[j, i] := mat[i, j];
      End;
   end;
 Application.ProcessMessages;


  except
    on E: Exception do
      begin
        if RadioButton2.Checked = True then
           FreeAndNil(IDoc2);

        if RadioButton1.Checked = True then
           IDoc2 := Nil;
      end;
  end;
end;

function TForm1.pegaConteudoFuncaoJS(str, nomeFunc : String) : String;
var
 sTemp : String;
begin
 sTemp := Copy(str, Pos(nomeFunc+'(', str) + (Length(nomeFunc)+1), Length(str));
 sTemp := Copy(sTemp, 0, Pos(')', sTemp) - 1);
 Result := sTemp;
end;


procedure TForm1.Button1Click(Sender: TObject);
const
  IEversion : Integer = 9; //get ie version
var
 ovTable, v : OleVariant;
 i, j, q, ncol,
 nrow : Integer;
 mat : Array of Array of String;
 sTemp : String;
 bTemReg, bSai : Boolean;
 //WBT : TWebBrowser;
 IDoc : IHTMLDocument2;
begin

 ncol := 0;
 nrow := 0;
 bTemReg := False;
 i := 0;
 j := 0;
 q := 0;
 bSai := False;

try
 IDoc := CreateComObject(Class_HTMLDOcument) as IHTMLDocument2;
 IDoc.designMode := 'on';

 if IEversion < 9 then
  while IDoc.readyState <> 'complete' do
     Application.ProcessMessages;

 v := VarArrayCreate([0, 0], VarVariant);
 v[0] := memo1.Text;
 IDoc.Write(PSafeArray(System.TVarData(v).VArray));
 IDoc.designMode := 'off';

 if IEversion < 9 then
  while IDoc.readyState <> 'complete' do
     Application.ProcessMessages;

 for q := 0 to (IDoc.all.tags('TABLE') as IHTMLElementCollection).Length -1 do
    begin
      ovTable := (IDoc.all.tags('TABLE') as IHTMLElementCollection).item(q, 0);

      for i := 0 to (ovTable.Rows.Length - 1) do
        begin
          for j := 0 to (ovTable.Rows.Item(i).Cells.Length - 1) do
            begin
              sTemp := TrimRight(TrimLeft(ovTable.Rows.Item(I).Cells.Item(J).InnerText));
              if (sTemp = 'Prova') = true then
                 begin
                  bSai := True;
                  Break;
                 end;
            end;
            if bSai = True then
              Break;
        end;
      if bSai = True then
        Break;
    end;

if bSai = False then //não achou...
   begin
    if RadioButton2.Checked = True then
       FreeAndNil(IDoc);

    if RadioButton1.Checked = True then
       IDoc := Nil;

     Exit;
   end;

  if RadioButton2.Checked = True then
     FreeAndNil(IDoc);

  if RadioButton1.Checked = True then
     IDoc := Nil;

  nrow := ovTable.Rows.Length;
  StringGrid1.RowCount := nrow;
  SetLength(mat, nrow);

  ncol := 7;
  StringGrid1.ColCount := ncol+1;
  for I := 0 to nrow - 1 do
     SetLength(mat[I], ncol+1);

for I := 0 to (nrow - 1) do
  begin
   if I = 0 then //linha 0 = nome dos campos
      begin
        sTemp := 'Lances';
        mat[I, 0] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(1).InnerText;
        mat[I, 1] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(2).InnerText;
        mat[I, 2] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(3).InnerText;
        mat[I, 3] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(4).InnerText;
        mat[I, 4] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(5).InnerText;
        mat[I, 5] := sTemp;
        sTemp := ovTable.Rows.Item(I).Cells.Item(6).InnerText;
        mat[I, 6] := sTemp;
        sTemp := 'link person';
        mat[I, 7] := sTemp;
      end
    else
      begin
        sTemp := ovTable.Rows.Item(I).Cells.Item(0).InnerText;
        mat[I, 0] := sTemp;
        if ovTable.Rows.Item(I).Cells.Length > 1 then //tem registros
           begin
            bTemReg := True;
            sTemp := ovTable.Rows.Item(I).Cells.Item(1).InnerText;
            mat[I, 1] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(2).InnerText;
            mat[I, 2] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(3).InnerText;
            mat[I, 3] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(4).InnerText;
            mat[I, 4] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(5).InnerText;
            mat[I, 5] := sTemp;
            sTemp := ovTable.Rows.Item(I).Cells.Item(6).InnerText;
            mat[I, 6] := sTemp;

           sTemp := ovTable.Rows.Item(I).Cells.Item(0).InnerHtml;
           sTemp := pegaConteudoFuncaoJS(sTemp, 'window.open');
           sTemp := Copy(sTemp, 0, Pos(',', sTemp)-1);
           sTemp := sTemp.Replace('''', '', [rfReplaceAll]);
           sTemp := URLEncodeMj(sTemp);
           mat[I, 7] := sTemp;
           end;
      end;//end if linha = 0
  end;//end for I (geral)


 for I := 0 to (nrow - 1) do
   begin
    for J := 0 to (Length(mat[I]) - 1) do
      Begin
       StringGrid1.Cells[j, i] := mat[i, j];
      End;
   end;
 Application.ProcessMessages;


  except
    on E: Exception do
      begin
        if RadioButton2.Checked = True then
           FreeAndNil(IDoc);

        if RadioButton1.Checked = True then
           IDoc := Nil;
      end;
  end;
end;

end.

DFM:

object Form1: TForm1
  Left = 0
  Top = 0
  Caption = 'Form1'
  ClientHeight = 583
  ClientWidth = 635
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 278
    Top = 256
    Width = 75
    Height = 25
    Caption = 'test 1'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Memo1: TMemo
    Left = 0
    Top = 0
    Width = 635
    Height = 225
    Align = alTop
    Lines.Strings = (
      '<html>'
      '<head>'
      '<meta http-equiv="expires" content="0">'
      '<meta http-equiv="cache-control" content="private">'
      '<meta http-equiv="pragma" content="no-cache">'
      '<meta HTTP-EQUIV="REFRESH" CONTENT="600; URL=Lsd.asp">'

        '<meta http-equiv="Content-Type" content="text/html; charset=iso-' +
        '8859-1">'

        '<link rel="stylesheet" href="../../imagens/style1.css" type="tex' +
        't/css">'
      '<script language="JavaScript">'
      '<!--'

        'function MM_reloadPage(init) {  //Updated by PVII. Reloads the w' +
        'indow if Nav4 resized'

        '  if (init==true) with (navigator) {if ((appName=="Netscape")&&(' +
        'parseInt(appVersion)==4)) {'

        '    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onr' +
        'esize=MM_reloadPage; }}'

        '  else if (innerWidth!=document.MM_pgW || innerHeight!=document.' +
        'MM_pgH) location.reload();'
      '}'
      'MM_reloadPage(true);'
      '//-->'
      '</script>'
      '</head>'

        '<body onLoad="setMouseCursortoHand('#39'type'#39','#39'button'#39');" bgcolor="#' +
        'FFFFFF" text="#000000" leftmargin="0" topmargin="0" '
      'marginwidth="0" marginheight="0" '
      'class="body_1">'

        '<script language="javascript" type="text/javascript" src="../../' +
        'imagens/action.js"></script>'
      '<table width="100%" border="0" cellspacing="0" cellpadding="0">'
      #9'<tr> '
      #9#9'<td><img src="/imagens/x2_dot.gif" width="2" height="2"></td>'
      '    </tr>'
      '    <tr> '
      #9#9'<td valign="top"> '

        '              <table width="100%" border="0" cellspacing="1" cel' +
        'lpadding="2">'

        '                  <td width="5"><img src="/imagens/x2_dot.gif" w' +
        'idth="2" height="2" /></td>'
      '                  <td> '

        '                    <table width="100%" border="0" cellspacing="' +
        '0" cellpadding="0">'
      '                      <tr> '

        '                        <td colspan="2" class="tex3a"><img src="' +
        '../../imagens/es.gif" width="199" height="23" '
      'align="absbottom" />&nbsp;</td>'
      '                        <td class="tex3a" width="23%"> '
      '                          <!--div para logotipos-->'

        '                          <div id="Layer4" style="position:absol' +
        'ute; width:183px; height:115px; z-index:4; top: 32px; visibility' +
        ': '
      'visible"></div>'
      '                          <!--div para logotipos- fim-->'
      '                        </td>'
      '                      </tr>'
      '                      <tr> '

        '                        <td width="1%"><img src="../../imagens/r' +
        'isco.gif" width="5" /></td>'

        '                        <th colspan="3" nowrap><img src="../../i' +
        'magens/risco2.gif" width="100%" height="3" /></th>'
      '                      </tr>'
      '                    </table>'
      '                  </td>'

        '                  <td width="5"> <img src="/imagens/x2_dot.gif" ' +
        'width="2" height="2" /></td>'
      '                </tr>'
      '              </table>'

        '              <table border="0" cellspacing="1" cellpadding="2" ' +
        'width="100%">'
      '                  <tr> '

        '                    <td valign="top" align="right" width="23"><i' +
        'mg src="../../imagens/tm_bullet4.gif" width="6" height="14" /></' +
        'td>'

        '                    <td class="tex3">Clique para ver detalhes</t' +
        'd>'
      '                  </tr>'
      '                  <tr> '

        '                    <td valign="top" align="right" width="23"><i' +
        'mg src="../../imagens/tm_bullet4.gif" width="6" height="14" /></' +
        'td>'
      '                    <td class="tex3">Aten'#195#167#195#163'o!<br /></td>'
      '                  </tr>'
      '                  <tr> '

        '                    <td valign="top" align="right" width="23">&n' +
        'bsp;</td>'
      '                    <td class="tex3b">'

        '                        <table border="0" width="100%" class="td' +
        '" cellpadding="2" cellspacing="1">'
      '<tr>'
      '<td></td>'
      '<td class="tex3b" align="center">Prova</td>'
      '<td align="center" class="tex3b" nowrap="nowrap">Cod.</td>'
      '<td align="center" class="tex3b" nowrap="nowrap">Empresa</td>'
      '<td align="center" class="tex3b">Data Abertura</td>'
      '<td align="center" class="tex3b">JJO</td>'
      '<td align="center" class="tex3b">PLO</td>'
      '<td></td>'
      '</tr>'
      '<tr>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'

        '<a href="#" OnClick="javascript:window.open('#39'gerencia_sdf.asp?pr' +
        'gcod=545686&amp;numprp=492015&amp;indSRP=N'#195
      #163'o&amp;indICMS=N'#195
      #163'o&amp;cns=true'#39','
      ''
      #9'   '

        #39#39','#39'toolbar=no,location=no,directories=no,status=no,menubar=no,s' +
        'crollbars=yes,resizable=yes,copyhistory=no,top=0,left=0, '
      'width=750, '
      'height=550'#39');return '
      '       false;">Item</a>'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'

        '<a href="#" OnClick="javascript:window.open('#39'detalhe_prop.asp?pr' +
        'gcod=545686'#39', '

        '        '#39'detalhe_proposta'#39','#39'maximized=yes, screenX=250, screenY=' +
        '0, '

        'toolbar=no,location=no,directories=no,status=no,menubar=no,scrol' +
        'lbars=yes,resizable=no,copyhistory=no,width=550,height'
      '=400'#39');return '
      '        false;">492015</a>'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'
      '925217'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3" align="center">'
      'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'
      '15/05/2015 11:00'
      '</td>'

        '<td bgcolor="#FFFFFF" class="tex3a" align="center">N&Atilde;O</t' +
        'd>'

        '<td bgcolor="#FFFFFF" class="tex3a" align="center">N&Atilde;O</t' +
        'd>'
      '<td bgcolor="#FFFFFF" class="tex3" align="center" />'
      '</tr>'
      ''
      '<tr>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'

        '<a href="#" OnClick="javascript:window.open('#39'gerencia_sdf.asp?pr' +
        'gcod=545686&amp;numprp=492015&amp;indSRP=N'#195
      #163'o&amp;indICMS=N'#195
      #163'o&amp;cns=true'#39','
      #9'   '

        #39#39','#39'toolbar=no,location=no,directories=no,status=no,menubar=no,s' +
        'crollbars=yes,resizable=yes,copyhistory=no,top=0,left=0, '
      'width=750, '
      'height=550'#39');return '
      '       false;">Item</a>'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'

        '<a href="#" OnClick="javascript:window.open('#39'detalhe_prop.asp?pr' +
        'gcod=545686'#39', '

        '        '#39'detalhe_proposta'#39','#39'maximized=yes, screenX=250, screenY=' +
        '0, '

        'toolbar=no,location=no,directories=no,status=no,menubar=no,scrol' +
        'lbars=yes,resizable=no,copyhistory=no,width=550,height'
      '=400'#39');return '
      '        false;">445665</a>'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'
      '845645'
      '</td>'

        '<td bgcolor="#FFFFFF" class="tex3" align="center"> ooooooooooooo' +
        'ooooooooooO'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'
      '15/05/2015 11:00'
      '</td>'

        '<td bgcolor="#FFFFFF" class="tex3a" align="center">N&Atilde;O</t' +
        'd>'

        '<td bgcolor="#FFFFFF" class="tex3a" align="center">N&Atilde;O</t' +
        'd>'
      '<td bgcolor="#FFFFFF" class="tex3" align="center" />'
      '</tr>'
      ''
      ''
      '<tr>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'

        '<a href="#" OnClick="javascript:window.open('#39'gerencia_fsdf.asp?p' +
        'rgcod=545686&amp;numprp=492015&amp;indSRP=N'#195
      #163'o&amp;indICMS=N'#195
      #163'o&amp;cns=true'#39','
      #9'   '

        #39#39','#39'toolbar=no,location=no,directories=no,status=no,menubar=no,s' +
        'crollbars=yes,resizable=yes,copyhistory=no,top=0,left=0, '
      'width=750, '
      'height=550'#39');return '
      '       false;">Item</a>'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'

        '<a href="#" OnClick="javascript:window.open('#39'detalhe_prop.asp?pr' +
        'gcod=545686'#39', '

        '        '#39'detalhe_proposta'#39','#39'maximized=yes, screenX=250, screenY=' +
        '0, '

        'toolbar=no,location=no,directories=no,status=no,menubar=no,scrol' +
        'lbars=yes,resizable=no,copyhistory=no,width=550,height'
      '=400'#39');return '
      '        false;">412345</a>'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'
      '785455'
      '</td>'

        '<td bgcolor="#FFFFFF" class="tex3" align="center"> kkkkkkkkkkkkk' +
        'kkkkkkkkkkkkkkkkk'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'
      '15/05/2015 11:00'
      '</td>'

        '<td bgcolor="#FFFFFF" class="tex3a" align="center">N&Atilde;O</t' +
        'd>'

        '<td bgcolor="#FFFFFF" class="tex3a" align="center">N&Atilde;O</t' +
        'd>'
      '<td bgcolor="#FFFFFF" class="tex3" align="center" />'
      '</tr>'
      ''
      ''
      '<tr>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'

        '<a href="#" OnClick="javascript:window.open('#39'gerencia_fsdf.asp?p' +
        'rgcod=545686&amp;numprp=492015&amp;indSRP=N'#195
      #163'o&amp;indICMS=N'#195
      #163'o&amp;cns=true'#39','
      #9'   '

        #39#39','#39'toolbar=no,location=no,directories=no,status=no,menubar=no,s' +
        'crollbars=yes,resizable=yes,copyhistory=no,top=0,left=0, '
      'width=750, '
      'height=550'#39');return '
      '       false;">ITem</a>'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'

        '<a href="#" OnClick="javascript:window.open('#39'detalhe_prop.asp?pr' +
        'gcod=545686'#39', '

        '        '#39'detalhe_proposta'#39','#39'maximized=yes, screenX=250, screenY=' +
        '0, '

        'toolbar=no,location=no,directories=no,status=no,menubar=no,scrol' +
        'lbars=yes,resizable=no,copyhistory=no,width=550,height'
      '=400'#39');return '
      '        false;">498745</a>'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'
      '312456'
      '</td>'

        '<td bgcolor="#FFFFFF" class="tex3" align="center"> ppppppppppppp' +
        'pppppppppppppppp'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center">'
      '15/05/2015 11:00'
      '</td>'
      '<td bgcolor="#FFFFFF" class="tex3a" align="center"> N&Atilde;O'
      '</td>'

        '<td bgcolor="#FFFFFF" class="tex3a" align="center">N&Atilde;O</t' +
        'd>'
      '<td bgcolor="#FFFFFF" class="tex3" align="center" />'
      '</tr>'
      ''
      '</table>'
      ''
      #9#9'            </td>'
      '                  <tr> '
      '                    <td></td>                            '
      '                    <td><br />'

        '                        <input type="button" name="voltar" value' +
        '="Voltar" class="texField2" '
      'onClick="location.href='#39'pregao1.asp'#39';return false;" />'
      '                    </td>'
      '                  </tr>'
      '             </table>'#9#9#9
      '         </td>'
      '    </tr>'
      '</table>'
      ''
      '</body>'
      '</html>')
    TabOrder = 1
  end
  object RadioButton1: TRadioButton
    Left = 14
    Top = 261
    Width = 51
    Height = 17
    Caption = ':= nil'
    Checked = True
    TabOrder = 2
    TabStop = True
  end
  object RadioButton2: TRadioButton
    Left = 70
    Top = 261
    Width = 88
    Height = 17
    Caption = 'FreeAndNil()'
    TabOrder = 3
  end
  object RadioButton3: TRadioButton
    Left = 166
    Top = 261
    Width = 57
    Height = 17
    Caption = 'nothing'
    TabOrder = 4
  end
  object StringGrid1: TStringGrid
    Left = 0
    Top = 312
    Width = 635
    Height = 271
    Align = alBottom
    TabOrder = 5
  end
  object Button2: TButton
    Left = 552
    Top = 256
    Width = 75
    Height = 25
    Caption = 'Clear'
    TabOrder = 6
    OnClick = Button2Click
  end
  object Button3: TButton
    Left = 360
    Top = 256
    Width = 75
    Height = 25
    Caption = 'test 2'
    TabOrder = 7
    OnClick = Button3Click
  end
end

0 个答案:

没有答案