Var
LibHandle:HWND;
DllNamerocedure(DllHandle:HWND);Stdcall;
LibHandle:=LoadLibrary('MyDll.dll');
if LibHandle<32 then
begin
MessageBox(Form1.Handle,'Not Found MyDll.dll','Error',0);
Exit;
end;
@DllName:=GetProcAddress(LibHandle,'View');
if @DllName=NIL then
begin
MessageBox(Form1.Handle,'Not Found View in MyDll.dll','Error',0);
FreeLibrary(LibHandle);
Exit;
end;
try
View(Application.Handle);
finally
FreeLibrary(LibHandle);
end;