views:

172

answers:

3

hello all friends..........

I create a form inside the Dll. But it compile is not successfully.Some Error below.

" Access violation at address 004EB784 in module 'Project1dll.dll'.Read of address 00000048"

Thanks.....

A: 

As well you should have a look here, it might help if your trouble is elsewhere .. Forms in dll

CheGueVerra
A: 

here's something i've found necessary to do this. see my example function below:

procedure DoSomething(hApp:THandle); export;
var
  hDllApplication:THandle;
begin
  hDllApplication:=Application.Handle;
  Application.Handle:=hApp;
  try
    DoItNow;
  finally
    Application.Handle:=hDllApplication;
  end;
end;
X-Ray
if you have database code in your DLL, you must do the same with Session.
X-Ray
+2  A: 

You are dereferencing a nil pointer somehow. Perhaps an object that hasn't been created?

Loren Pechtel