Article View: comp.windows.ms.programmer
Article #60Re: Shared Global Memory
From: Martin Schloeter
Date: Fri, 24 Jul 1992 11:20
Date: Fri, 24 Jul 1992 11:20
36 lines
2277 bytes
2277 bytes
m > My are questions: m > m > 1) Is there any system penalty for always using shared memory? m > For example, is it a limited resource or is it more costly m > to access? Think so, but no quite sure. m > 2) Is GMEM_DDESHARE really even necessary for Windows 3.0 in standard m > or enhanced modes or Windows 3.1? Or is it just a throw back from m > EMS banked memory and real mode? No, there is really different handling. For example "normal" global memory allocated inside a DLL belongs to the app using the DLL, but "GMEM_DDESHARE"-memory allocated inside a DLL belongs to the DLL! m > 3) Can I send pointers to shared memory between apps and use them m > directly? Yes, with Win 3.x. m > 4) Is the following scenario a still a restriction under 3.1 or 3.0 m > in standard and enhanced: m > m > -- App A creates shared memory and writes to it m > -- App A sends a message to App B containing the handle/pointer m > of the shared memory m > -- App B reads the shared memory, does something interesting, m > and then writes the results to the same shared memory m > -- App B sends a message to App A saying "all done, read the m > the shared memory that you sent me" m > -- App A reads it m > m > The question is does App A see anything useful. Yes, with Win 3.x it will work fine. But be aware, with future 32-Bit-Windows-Version it will not be allowed to pass memory-references directly between apps. The apps will have strictly separeted adress spaces! In this environment you will have to a real DDE-protocol via DDESendMessage and so on. Greetings Martin
Technical Details
Message-ID:
<18946200@p3.f67.n245.z2.fidonet.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!dfv.rwth-aachen.de!sungate.fido.de!p1.hippo.fido.de!eurologic.fido.de!Martin_SchloeterShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!dfv.rwth-aachen.de!sungate.fido.de!p1.hippo.fido.de!eurologic.fido.de!Martin_Schloeter Date: Fri, 24 Jul 92 13:20:44 +0200 From: Martin_Schloeter@eurologic.fido.de (Martin Schloeter) Subject: Re: Shared Global Memory Message-ID: <18946200@p3.f67.n245.z2.fidonet.org> Newsgroups: comp.windows.ms.programmer X-Comment-To: mike_t@hyperdesk.com (Mike_t) Organization: martin_schloeter@eurologic.fido.de Lines: 36