delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/03/29/12:55:25

From: calder AT stat DOT colostate DOT edu (Matt Calder)
Subject: Calling gnu32-dlls from 16-bit programs
29 Mar 1997 12:55:25 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.SUN.3.96.970329062136.2825B-100000.cygnus.gnu-win32@tlaloc>
Mime-Version: 1.0
X-Authentication-Warning: tlaloc.stat.colostate.edu: calder owned process doing -bs
X-Sender: calder AT tlaloc
Original-To: gnu-win32 AT cygnus DOT com
In-Reply-To: <m0wAcky-000AK1C@jacob.remcomp.fr>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

	Thanks for the quick response, but I perhaps didn't make
the situation clear. So  here is a more precise description: I have
a 16-bit dll written in MSVC that can call 32-bit dlls via the 
'Generic thunking' functions LoadLibraryEx32W, GetProcAddress32W,
and CallProcEx32W. This works for 32-bit dlls generated by MSVC
and Borland 4.52. It seems to me that there is no special processing
required by the 32-bit compiler, a dll is a dll is a dll (Here is
where I might be wrong). The compiler support you mention
is on the 16-bit end and is taken care of by the above mentioned API's.
(I realize that calls back into the 16-bit dll are out of the question, 
which is perhaps your point). The problem arises that the 32-bit dll
does not load with the LoadLibraryEx32W, and I cannot obtain error
information. I seem to recall a thread concerning LoadLibrary and
gnu32 dlls, was that ever resolved?

Matt

> Your question about not being able to link 32-16 thunking layer is easily
> answered: this will never work because that kind of support needs a lot
> of help from the compiler: pointers have to be converted from 32 bit flat
> pointers to 16:16 segmented pointers before you can use those in a 16 bit
> application. This is not provided by gcc at all, so that will never work.
> 

/*****************************************/
/* Matt Calder, Dept. of Statistics, CSU */
/* http://www.stat.colostate.edu/~calder */
/*****************************************/

-
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