Subject: Calling gnu32-dlls from 16-bit programs
From: [email-masked] (Matt Calder)

29 Mar 1997 12:55:25 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <Pine.SUN.3.96.970329062136.2825B-100000.cygnus.gnu-win32@tlaloc>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Authentication-Warning: tlaloc.stat.colostate.edu: calder owned process doing -bs
X-Sender: calder@tlaloc
Original-To: [email-masked]
In-Reply-To: <[email-masked]>
Original-Sender: [email-masked]

	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
"[email-masked]" with one line of text: "help".