The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Glenn9999 on April 03, 2011, 07:05:35 PM

Title: Thunk calling a 16-bit DLL
Post by: Glenn9999 on April 03, 2011, 07:05:35 PM
I have a 16-bit DLL that I was wanting to try and call from a 32-bit program.  The DLL really doesn't have a replacement, so really thunk calling it is the only way.  I found a couple of samples, but they have various problems.    Does anyone have a definite way to be able to do this on any operating system?
Title: Re: Thunk calling a 16-bit DLL
Post by: jj2007 on April 03, 2011, 07:42:29 PM
I have only experience the other way round, but here is a piece that might give you an idea.
Title: Re: Thunk calling a 16-bit DLL
Post by: dedndave on April 03, 2011, 08:11:17 PM
even if you can do it, you will have problems   :P
what is the function of the DLL ? - it may be easier, and it would certainly be better, to replace it with 32-bit
Title: Re: Thunk calling a 16-bit DLL
Post by: jj2007 on April 03, 2011, 10:18:04 PM
Attached a little testbed. The problem is the undocumented UTRegister function, see here (http://support.microsoft.com/kb/125212) for a bit of "support".

P.S.: I hope the author of this excellent article on GfaBasic (http://www.avdf.com/vault/forum/vault/dist/3-1/newa0034.htm) sees this post, and might give us a hint.