delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/12/18/11:19:12

From: dessex AT widow DOT aracnet DOT net (David Essex)
Subject: Calling gnu-win32 DLLs from Delphi2
18 Dec 1996 11:19:12 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <1.5.4.32.19961218161510.0067dc48.cygnus.gnu-win32@aracnet.net>
Mime-Version: 1.0
X-Sender: dessex AT aracnet DOT net
X-Mailer: Windows Eudora Light Version 1.5.4 (32)
Original-To: gnu-win32 <gnu-win32 AT cygnus DOT com>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

I finally succeeded in calling gnu-win32 DLLs from Delphi2. I have enclosed
sample code. 
However if I try this method and try to use 2 DLLs they will not load. Both
win95 and Dephi2 will display invalid format error messages. Does anybody
have any clues as to what the problem is?  

David

---
Note: This code will work with many fuctions in a DLL.

interface
//The following external declaration imports a function called MessageBox
from the DLL called 'user32.dll'
//(part of the Windows API): function MessageBox(HWnd: Integer; Text,
Caption: PChar Flags: Integer): Integer; stdcall;
//external 'user32.dll' name 'MessageBoxA';

function charfunct(t: integer): PChar; stdcall;

implementation

function charfunct; stdcall; external 't12.dll' name 'inadll';

---

-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019