Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!nuchat!sugar!karl From: karl@sugar.hackercorp.com (Karl Lehenbauer) Newsgroups: comp.windows.ms Subject: Show-stopper in wstdio.c/3.0 SDK tty sample app Keywords: Win 3.0 SDK, tty sample app, wstdio.c, LocalAlloc, LocalLock Message-ID: <6589@sugar.hackercorp.com> Date: 21 Sep 90 03:11:30 GMT Reply-To: karl@sugar.hackercorp.com (Karl Lehenbauer) Organization: Sugar Land Unix - Houston Lines: 21 The wstdio.c module in the tty sample application has some code that is a guaranteed GP ever time. In the initialization routine, stdioInit, the code does a LocalAlloc to get a handle to some memory to use for registering a class with windows. It then CASTS THE HANDLE TO A POINTER AND TRIES TO REFERENCE FIELDS WITH IT! Looks like it needs to do a LocalLock on the handle and use the address returned by LocalLock as a pointer, eh? I guess just having a WNDCLASS structure created on the stack is no good unless you know you're going to be large model only since DS != SS. By the way, with respect to all the people who are down on large model, how big are your applications, anyway? 64K of code space doesn't really go very far for any "real" application, I don't think. -- -- uunet!sugar!karl -- Usenet access: (713) 438-5018