home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.win32
- Path: sparky!uunet!microsoft!hexnut!johnhall
- From: johnhall@microsoft.com (John Hall)
- Subject: Re: NT, 3.1, and Global Memory
- Message-ID: <1992Sep02.180251.7874@microsoft.com>
- Date: 02 Sep 92 18:02:51 GMT
- Organization: Microsoft Corporation
- Keywords: global memory
- Lines: 43
-
- 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.
-
- No. This won't work.
- However, I have just posted a dll which handles shared memory
- under Windows NT. Operations are ShrAlloc(), ShrLock(),
- ShrUnlock(), ShrFree(), ShrName() to assign a name to a handle
- and ShrGet() to get a handle based upon a name.
-
- I even make heroic efforts to force all addresses to be identical
- across processes.
-
- This is available on Compuserve WIN32 porting from OS/2.
- Included in this kit is source code for the dll, test code,
- and some discussions on implementation decisions.
-
- I'll ask Alistair to place it on ftp.
-
-
- | (2) Are global variables declared in a DLL shareable between
- | applications under Windows NT? Again, I know it works under 3.1
-
- You can arrange for this to work. See the example listed.
-
- | (3) If a DLL enters a message loop on behalf of an application, will
- | that message loop receive messages posted to the application
- | properly under NT? Once again, it works under 3.1.
-
- I don't see why not.
-
- --
- -------------------------
- My comments are my own. They are independent and unrelated to the
- views of my company , relatives or elected representatives.
-
-