Passing pointer to dll [Invalid Pointer Operation]

I have been trying to be able to pass a Pointer to a dll and then have
the dll populate the value at the address of that Pointer.  My problem
is that it successfully executes the operation as intended but also
gives me "Invalid Pointer Operation" error.

The Following is the source in the .exe
---------------------------------------
unit PtrUnit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs,
  StdCtrls;

type
  NullTstring = array[0..127] of Char;

  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    function SimDll(Val1: NullTstring;
                    Val2: PString): Boolean;
  private
    { Private declarations }
    DllHandle: Integer;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

  Dll: function(Val1: NullTstring;
                Val2: Pstring): Boolean; Cdecl;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
  Temp: string;
  Val1: NullTstring;
begin
  @Dll := GetProcAddress(DllHandle,'Dll');

  StrPCopy(Val1,Edit1.Text);

  Dll(Val1,
      @Temp);

  Edit2.Text := Temp;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  Temp: string;
  Val1: NullTstring;
begin
  StrPCopy(Val1,Edit1.Text);

  SimDll(Val1,
         @Temp);

  Edit2.Text := Temp;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  DllHandle := LoadLibrary('PtrDllProject1.dll');
end;

function TForm1.SimDll(Val1: NullTstring;
                       Val2: PString): Boolean;
begin
  Result := False;

  try
    Val2^ := Val1;
  except
    Result := True;
  end;
end;

end.
---------------------------------------
Button1 sends the request to the dll.
Button2 sends the same request to a simulation routine inside the exe.

Both succeed but the req to the dll gets "Invalid Pointer Operation".

The Following is the source in the .dll
---------------------------------------
unit PtrDllUnit1;

interface

type
  NullTstring = array[0..127] of Char;

  function Dll(Val1:  NullTstring;
               Val2:  Pstring): Boolean; Cdecl;

implementation

function Dll(Val1:  NullTstring;
             Val2:  Pstring): Boolean;
begin
  Result := False;

  try
    Val2^ := Val1;
  except
    Exit;
  end;

  Result := True;
end;

end.
---------------------------------------
Dll function is exported.
Library uses SysUtils, Classes, and PtrDllUnit1.

Thanks for your help!

mailto:Ray.Spagn...@mindspring.com