home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.win32
- Path: sparky!uunet!pipex!demon!edscom!kevin
- From: kevin@edscom.demon.co.uk (Kevin Broadey)
- Subject: Re: NT, 3.1, and Global Memory
- In-Reply-To: Martin_Schloeter@eurologic.fido.de's message of Wed, 2 Sep 92 10:06:59 +0200
- Message-ID: <KEVIN.92Sep3230205@runningbear.edscom.demon.co.uk>
- Sender: kevin@edscom.demon.co.uk (Kevin Broadey)
- Organization: EDS-Scicon, Milton Keynes, UK
- References: <199bb4a9@p3.f67.n245.z2.fidonet.org>
- Date: Thu, 3 Sep 1992 23:02:05 GMT
- Lines: 62
-
- >>>>> In article <199bb4a9@p3.f67.n245.z2.fidonet.org>, "MS" ==
- >>>>> Martin_Schloeter@eurologic.fido.de (Martin Schloeter) writes:
-
- >>>>> "RB" == Robert Baruch
-
- RB> After reading countless paragraphs on how Windows supports only
- RB> a few means of data transfer between applications, I have come
- RB> to the conclusion that if I didn't want to use DDE, I could use
- RB> a DLL, and GlobalAlloc memory which could then be shared between
- RB> all the applications using that DLL.
-
- RB> My questions are:
-
- RB> (1) If I GlobalAlloc in the DLL, and get a handle using one
- RB> application, then another application accesses this handle, will
- RB> I get the data from the first application UNDER WINDOWS NT? I
- RB> know that it works under Windows 3.1.
-
- MS> Under 3.1 it works only with memory with the attribute
- MS> GMEM_DDESHARE! Regarding the existing informations it will
- MS> definitly _not_ work with NT. The API calls DDEPostMessage and
- MS> similiar do some magic, which allows to transfer data between NT
- MS> apps. Simple DDEShare-memory will not work.
-
- It does work. If you GlobalAlloc(GHND | GMEM_DDESHARE, size) in one
- application, you can PostMessage the handle to another application,
- GlobalLock it there and read whatever the first application wrote there.
- The same is true of memory GlobalAlloc'ed in a DLL.
-
- I've tried it so I know it works.
-
- RB> (2) Are global variables declared in a DLL shareable between
- RB> applications under Windows NT? Again, I know it works under 3.1
-
- MS> No.
-
- Again, this can be done. You need to put:-
-
- SECTIONS
- .data READ WRITE SHARED
- .bss READ WRITE SHARED
-
- in the .DEF file for your DLL. Again, I'm using this at the moment.
-
- RB> (3) If a DLL enters a message loop on behalf of an application,
- RB> will that message loop receive messages posted to the
- RB> application properly under NT? Once again, it works under 3.1.
-
- MS> Don't know, have to test it.
-
- I can't help either :-)
-
- --
- Kevin Broadey <kbroadey@edscom.demon.co.uk>
- EDS-Scicon, Wavendon Tower, Wavendon, Milton Keynes, MK17 8LX, England.
- Phone: +44 908 284198 (direct) or +44 908 585858 ext 4198
- These opinions are mine: others available on request.
- --
- Kevin Broadey <kbroadey@edscom.demon.co.uk>
- EDS-Scicon, Wavendon Tower, Wavendon, Milton Keynes, MK17 8LX, England.
- Phone: +44 908 284198 (direct) or +44 908 585858 ext 4198
- These opinions are mine: others available on request.
-