Problems with importing Delphi 2.0 DLL's in Delphi 2.0

Hi All,

I have being making and importing DLL with Delphi 1.0 without any problems,
I have being making DLL's in Delphi 2.0 for use inside Windows or as
extensions to the Delphi IDE, but I can not make a DLL in Delphi 2.0 and
successfully use my own fuunctions.

I use only PChars, for not getting in to STRING troubles, and I have
declared my functions StdCall, because as far as I understand, it is the
(de facto) standard for public DLL's (correct me if I'm wrong).

I import via a dynamic load - LoadLibrary & GetProcAddress.

Example

--- DLL

Function MyFunc(X : Integer) : Boolean; StdCall;

Export
  MyFunc Index 1;

--- Import

Type
  MyFunc = Function (X : Integer) : Boolean; StdCall;

DllHandle := Loadlibrary('MyDll.DLL');
If DllHandle >= 32 Then
Begin
  @MyFunc := GetProcAddress('MyFunc');
  If MyFunc(1) Then    <-- After this call the program gives an error
message, and I have 18 % System resources left !!!!
    ..Do Something ..
end.

Any ideas what I do wrong?

--
Regards (Gr?e, Hilsen),
  Martin Djern?s