Article View: borland.public.cppbuilder.nativeapi
Article #7811Re: Close Form in DLL
From: KL Chin
Date: Tue, 21 Dec 2004 04:01
Date: Tue, 21 Dec 2004 04:01
44 lines
2408 bytes
2408 bytes
Hi Remy, I have create a program act as either Video Server or Client. where the Server can close the client exe remotely. It had 2 main portion, EXE and DLL, DLL was a form with DsPack component written in C++Builder 5 and EXE in C++Builder4. The problem almost every time (99%) had problem when close the application remotely, by issue the PostMessage with WM_CLOSE or Close. Where the application always access/call/jump to the free-ed DLL memory/code area (filled with 0 or ???? view with debugger), where I'm not sure the code belonging to which lib, bcoz the debugging show the wrong source code or little info. The problem will not happen if it was Close by click the Window 'X' button or press Alt-F4 on the client PC. But I have just tested with PostMessage with WM_CLOSE and WM_DESTROY, the problem look like dissapeared. What is the different, if just WM_CLOSE with WM_CLOSE and WM_DESTROY? Regards KL Chin "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:41c79929$3@newsgroups.borland.com... > > "KL Chin" <klchin@1asia.com.my> wrote in message > news:41c78d36@newsgroups.borland.com... > >> Everything were fine until it going to close the application, where >> it receive a signal from remote PC, either with WM_CLOSE.or >> Close. At this closing process, this form will call main EXE to >> unload the DLL later. The problem was where free-ed code area >> always access/call-back again. > > Please clearify. > > > Gambit > >
Technical Details
Message-ID:
<41c7a03a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41c78d36@newsgroups.borland.com> <41c79929$3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bd28311fbf37010b X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "KL Chin" <klchin@1asia.com.my> Newsgroups: borland.public.cppbuilder.nativeapi References: <41c78d36@newsgroups.borland.com> <41c79929$3@newsgroups.borland.com> Subject: Re: Close Form in DLL Date: Tue, 21 Dec 2004 12:01:58 +0800 Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 219.93.184.30 Message-ID: <41c7a03a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1103601722 219.93.184.30 (20 Dec 2004 20:02:02 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail