Teen Programmers Unite  
 

 

Return to forum top

Richedit problems

Posted by Talon [send private reply] at October 18, 2001, 12:06:20 PM

Ok, I have a dialog box that has two richedit controls in it. Everything runs fine and all until I close the program, then it gives me a blue screen of death. The problem seems to be when the program uses FreeLibrary upon closing to free the RICHED32.DLL I loaded with LoadLibrary. The strange thing is there aren't any problems when I use only ONE richedit control. Any ideas?

Posted by SkitzoBurn [send private reply] at October 18, 2001, 05:34:12 PM

Hmm, interesting problem. Does the program require the use of two richedit controls? Cuzz, as far as I've heard, the little secret project yer working on doesn't actually need it to be finished and you're just being anal over it.

Later, SkitzoBurn

Posted by Talon [send private reply] at October 18, 2001, 08:09:03 PM

Lol, that's 'anal retentive', not 'anal'. And it DOES need them! You're just jealous because my skills far outclass yours!

Posted by taubz [send private reply] at October 19, 2001, 01:08:56 PM

maybe they "superclass" his

Do you need to free the libray? Maybe it's special or something.

Posted by Talon [send private reply] at October 19, 2001, 07:21:54 PM

Yeah, I'm pretty sure you're supposed to, every tutorial I've read has said to do it. Of course I haven't found one yet that uses two richedits.. stupid things..

Posted by taubz [send private reply] at October 20, 2001, 05:27:25 PM

There must be something wrong with the way you're creating the second control, then....

- taubz

Posted by Psion [send private reply] at October 20, 2001, 08:36:17 PM

I don't know anything about this topic in particular, but one wonders if you are passing the same pointer to both controls, where both controls are then under the contract to free the memory the pointer references when they are closed. This would quite obviously lead to trying to free some memory twice.

Posted by Cobbs [send private reply] at October 20, 2001, 09:16:02 PM

SkitzoBurn's post was about as useful as this one.

Posted by Psion [send private reply] at October 21, 2001, 07:01:12 AM

Well, Cobbs, it would be quite helpful to me if that were indeed the problem, and I hadn't thought of that angle before.

Posted by gian [send private reply] at October 21, 2001, 05:18:30 PM

I have something of an inkling that they know each other.... outside of TPU.... KILL THE SPLITTERS!

Posted by Talon [send private reply] at October 21, 2001, 08:30:02 PM

Well, I think it's gotta be some kinda memory issue or I'm not loading something right or something. The thing is, I load the library once, and free it once, so, I don't know.. Stupidass richedit controls, I freaking HATE THEM!

Posted by have_dinner [send private reply] at October 22, 2001, 05:40:48 AM

i don't like to say anything here, plainly cos i know nothing about what you're saying. But logic suggests to me that when the library is being free'd, it is not flushing the memory of it... ie: when it is loaded the first time, it is loaded from nothing... maybe if you create something that will cause the system to load a whole lot of nothing, it will trick the memory... it that is irrelevant, please just delete this post

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.