Board index » delphi » need help: de{*word*81} kernel error 1

need help: de{*word*81} kernel error 1

hi everybody,
desperately need help on using dll's in D2. tried everything to use
dll, wrapper or not, keep getting 'de{*word*81} kernel error 1' at
runtime. everythings compiles fine, but no way to make it work.
happened with different dlls, here is some sample:
the user32.dll messagebox works, and so far its the only one i could
get working. maybe a newbie question, since nobody else seems to have
this problem.
anyways drives me crazy.
any help greatly appreciated, greetinx ulf.

...
implementation

Function NDdeGetNodeName
    ( lpszNodeName : PChar;
    cchNodeName : LongInt  ) : Word;                          
stdcall; external 'nddeapi.dll' name 'NDDEGETNODENAME';

  function MessageBox(HWnd: Integer; Text, Caption: PChar ;Flags:
Integer): Integer; stdcall;
external 'user32.dll' name 'MessageBoxA';

 

Re:need help: de{*word*81} kernel error 1


u...@iflugs.hdk-berlin.de schrieb in Nachricht
<34ae6767.6117...@news.fu-berlin.de>...

Quote
>Function NDdeGetNodeName
>    ( lpszNodeName : PChar;
>    cchNodeName : LongInt  ) : Word;
>stdcall; external 'nddeapi.dll' name 'NDDEGETNODENAME';

>  function MessageBox(HWnd: Integer; Text, Caption: PChar ;Flags:
>Integer): Integer; stdcall;
>external 'user32.dll' name 'MessageBoxA';

Afaik, under Win32, names of routines (fuctions or procedures) are
case sensitive. So perhaps you should name it 'NDdeGetNodeName' in the
declaration.

Other possibilities are:
- Your dll is 16 bit. It's (almost?) impossible to
  call it from 32 bit Delphi (2 or 3).
  You could check this with Quickview (Schnellansicht).
  Look at the target platform.
- Your dll uses a different calling convention, like
  cdecl, pascal or even register. You'll have
  to try this.

Rudy Velthuis

Other Threads