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: johnhall@microsoft.com's message of 02 Sep 92 18:02:51 GMT
- Message-ID: <KEVIN.92Sep4095239@runningbear.edscom.demon.co.uk>
- Sender: kevin@edscom.demon.co.uk (Kevin Broadey)
- Organization: EDS-Scicon, Milton Keynes, UK
- References: <1992Sep02.180251.7874@microsoft.com>
- Date: Fri, 4 Sep 1992 09:52:39 GMT
- Lines: 56
-
- >>>>> Regarding Re: NT, 3.1, and Global Memory; johnhall@microsoft.com
- >>>>> (John Hall) adds:
-
- In article baruch@nynexst.com (Robert Baruch) writes:
-
- | After reading countless paragraphs on how Windows supports only
- | a few means of data transfer between applications, I have come to
- | the conclusion that if I didn't want to use DDE, I could use a DLL,
- | and GlobalAlloc memory which could then be shared between
- | all the applications using that DLL.
- |
- | My questions are:
- |
- | (1) If I GlobalAlloc in the DLL, and get a handle using one application,
- | then another application accesses this handle, will I get the data from
- | the first application UNDER WINDOWS NT? I know that it works
- | under Windows 3.1.
-
- John> No. This won't work.
-
- John> However, I have just posted a dll which handles shared memory
- John> under Windows NT. Operations are ShrAlloc(), ShrLock(),
- John> ShrUnlock(), ShrFree(), ShrName() to assign a name to a handle
- John> and ShrGet() to get a handle based upon a name.
-
- John> I even make heroic efforts to force all addresses to be identical
- John> across processes.
-
- John> This is available on Compuserve WIN32 porting from OS/2.
-
- John> Included in this kit is source code for the dll, test code,
- John> and some discussions on implementation decisions.
-
- John> I'll ask Alistair to place it on ftp.
-
- There's something strange going on here.
-
- I've got 2 Windows 3.1 applications that I'm porting to NT.
-
- App1 does GlobalAlloc, GlobalLock, fills in the memory, GlobalUnlock,
- PostMessage the handle to app2.
-
- App2 does GlobalLock, reads the memory, GlobalUnlock, GlobalFree.
-
- Everything is fine and dandy.
-
- Admittedly this isn't done in a DLL, but since DLLs (by default) run as
- if they were part of the app (accessing the app's data space, for
- instance) this shouldn't make any difference.
-
- So what's going on?
- --
- 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.
-