Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!deccrl!news.crl.dec.com!shlump.nac.dec.com!sieras.enet.dec.com!wallis From: wallis@sieras.enet.dec.com (Barry L. Wallis) Newsgroups: comp.windows.ms.programmer Subject: Re: CreateWindows() with BC++ gives exception 13 / error 0 Message-ID: <21311@shlump.nac.dec.com> Date: 20 Mar 91 21:49:30 GMT Sender: newsdaemon@shlump.nac.dec.com Organization: Digital Equipment Corporation Lines: 27 In article <1991Mar16.184505.18776@hyper.hyper.com>, bonneau@hyper.hyper.com (Paul Bonneau) writes... >In article <1991Mar14.071522.21044@ciba-geigy.ch> whkr@ciba-geigy.ch (Hans Kraft) writes: >>Don't put a pointer into the extra data area of a window, as that >>pointer could refer to a movable or even discadable segment. After >>reload or move of the according segment (done without notice by >>windows) the pointer is obsolete. > >I missed the parent article, so I don't know if the pointer >was FAR or not, but... > >There is no problem with storing NEAR pointers. If the >default data segment moves, so does the pointer. > >cheers - Paul Bonneau. Thanks to all who helped. Using GlobalAlloc() is certainly the safest way. However, yes I am using NEAR pointers. I am 400 miles from my PC so I cannot verify the following: does castng an object pointer to LPSTR change it from being a NEAR pointer to being a FAR pointer? --- Barry L. Wallis USENET: wallis@labc.dec.com Database Consultant Prodigy (don't laugh): DNMX41A U.S. DECtp Resource Center DECUServe: EISNER::WALLIS (not on the net yet) Los Angeles, CA "No one voted for me, I represent myself" ---