Article View: comp.os.ms-windows.programmer.win32
Article #2093Re: Calling 32-bit DLLs from 16-bit-Applications
From: Brad Wilson
Date: Thu, 01 Feb 1996 15:33
Date: Thu, 01 Feb 1996 15:33
41 lines
2312 bytes
2312 bytes
Wolfgang Steiner wrote:
> my problem is following:
> I must use a 32bit-DLL from Visual Basic 3.0 (a 16bit-application)
> under WfW (the DLL also runs with Win32s) and Win95.
[snip]
> ) Writing a 32bit-OLE-Server? (I could use VC++ 4.0)
This is probably your easiest way to get things done. Write the OLE
server with automation exports, and call the automation calls in the
16-bit application. The advantage here is that the OLE libraries will
automatically "marshall" the calls across 16- and 32-bit, regardless
of the operating system in use.
Thunking is also an option, but it's specific to the operating system,
so Win32s thunking would _only_ work under WfW. For what it's worth,
though, the Win32s thunking is extremely easy to do.
See the Win32s documentation for information on thunking.
> Is it true, that OLE-container and OLE-server can be written
> for different APIs (16,32bit)?
OLE will automatically marshall across the bit boundary, as long as
both are executables. In-process servers (DLLs) do not have the benefit
of the automatic marshalling.
--
class CBradWilson : public CWorldWatchProgrammingTeam {
public:
void GetInetAddr ( CString& s ) { s = "bradw@exptech.com"; }
void GetE164Addr ( CString& s ) { s = "+1 (810) 620-9803"; }
void GetURL ( CString& s ) { s = "http://www.exptech.com"; }
void GetDisclaimer( CString& s ) { s = "All I say is fact :-p"; }
};
// QOTW: "Don't think of yourself as the least intelligent creature in this
// room ... if you consider the entire planet, you're smarter than
// literally hundreds of people." - Dogbert to Dilbert
Technical Details
Message-ID:
<3110DD3B.455D@exptech.com>Path:
arc1-ca.pugleaf.net!news2.acs.oakland.edu!newsReferences:
<4enu1u$20c_001@adv.magwien.gv.at>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news2.acs.oakland.edu!news From: Brad Wilson <bradw@exptech.com> Newsgroups: comp.os.ms-windows.programmer.win32,comp.lang.basic.visual.misc,comp.os.ms-windows.programmer.ole,comp.lang.c++ Subject: Re: Calling 32-bit DLLs from 16-bit-Applications Date: Thu, 01 Feb 1996 10:33:15 -0500 Organization: Express Technologies Corp. Message-ID: <3110DD3B.455D@exptech.com> References: <4enu1u$20c_001@adv.magwien.gv.at> NNTP-Posting-Host: ppp-pm01-dy-26.opr.oakland.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.0b5 (WinNT; I)