🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2562

Global Memory Goes Away?

#2562
From: Kevin P. Kleinfelter
Date: Wed, 08 May 1991 18:50
15 lines
1199 bytes
I allocate some memory with "GlobalAlloc(GMEM_MOVEABLE|GMEM_ZEROINIT,2048)"
in instance 1 of my program.  I store the handle to this memory in a
class extra word.  Instance 2 shares this memory, by getting the handle from
the class word.

This works fine, until instance 1 terminates; at this point instance 2
can no longer GlobalLock.  It looks like Windows is calling GlobalFree
for me.  Other than writing a DDE for sharable memory, how can I prevent the
freeing and allow sharing?

-- 
Kevin Kleinfelter @ DBS, Inc (404) 239-2347   ...gatech!nanoVX!msa3b!kevin
English Lesson: THEY'RE at THEIR home, over THERE. YOU'RE sure of YOUR facts?
"Its" & "their" are like 'his'. "They're" == "they are." "It's" == "it is."
If you can do regular expressions, you can handle a natural language. Syntax!
Technical Details
Message-ID: <1639@msa3b.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sol.ctr.columbia.edu!emory!wa4mei!nanovx!msa3b!kevin

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sol.ctr.columbia.edu!emory!wa4mei!nanovx!msa3b!kevin
From: kevin@msa3b.UUCP (Kevin P. Kleinfelter)
Newsgroups: comp.windows.ms.programmer
Subject: Global Memory Goes Away?
Message-ID: <1639@msa3b.UUCP>
Date: 8 May 91 18:50:23 GMT
Organization: Dun and Bradstreet Software, Inc., Atlanta, GA
Lines: 15