Property page : Debug exe not working with Release DLL (vc6) 
Author Message
 Property page : Debug exe not working with Release DLL (vc6)

Hello all. More problems.

So, I've got an EXE and an extension DLL which exports two classes -
one of my own devising and one which is a property page.  It works
fine where both EXE and DLL are the same configuration (Debug /
Release) but if they're different (ie Debug EXE and Release DLL it
ASSERTS errors on

void CPropertySheet::AddPage(CPropertyPage* pPage)
{
        ASSERT_VALID(this);
        ASSERT(pPage != NULL);
        ASSERT_KINDOF(CPropertyPage, pPage);      < ---- HERE

typically pPage=(memory){class PropPage hWnd=????}  

(just checked - debug DLL has all the same settings but carries on
regardless)

However, with a release EXE and a debug DLL I get
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
        { ASSERT(afxCurrentResourceHandle != NULL);      <---- CRASH

Is ther some reason why I can't mix and match release / debug
components???

Cheers, TIA etc;
Si.



Mon, 30 May 2005 11:37:37 GMT  
 Property page : Debug exe not working with Release DLL (vc6)
Hi Si,

Debug version and release use different memory allocator. They can't be
mixed together. Allocating memory by one allocator and freed it by another
will cause problems.

You can check the TN033 and Dr. Joseph's MVP tips web site for more
information:

http://www.pgh.net/~newcomer/debug_release.htm

Note: The DLL Hell section may be what you want.

Hope this helps.

Best Regards,
Leo Chen

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

| Newsgroups: microsoft.public.vc.mfc
| Subject: Property page : Debug exe not working with Release DLL (vc6)

| X-Newsreader: Forte Agent 1.91/32.564
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 33
| Date: Thu, 12 Dec 2002 10:37:37 +0000
| NNTP-Posting-Host: 213.107.214.114

| X-Trace: newsfep2-gui 1039689418 213.107.214.114 (Thu, 12 Dec 2002
10:36:58 GMT)
| NNTP-Posting-Date: Thu, 12 Dec 2002 10:36:58 GMT
| Organization: ntlworld News Server
| Path:
cpmsftngxa09!cpmsftngxa10!tkmsftngp01!newsfeed00.sul.t-online.de!newsfeed01.
sul.t-online.de!t-online.de!newspeer1-gui.server.ntli.net!ntli.net!newsfep2-
gui.POSTED!53ab2750!not-for-mail
| Xref: cpmsftngxa09 microsoft.public.vc.mfc:359339
| X-Tomcat-NG: microsoft.public.vc.mfc
|
|
| Hello all. More problems.
|
|
| So, I've got an EXE and an extension DLL which exports two classes -
| one of my own devising and one which is a property page.  It works
| fine where both EXE and DLL are the same configuration (Debug /
| Release) but if they're different (ie Debug EXE and Release DLL it
| ASSERTS errors on
|
| void CPropertySheet::AddPage(CPropertyPage* pPage)
| {
|       ASSERT_VALID(this);
|       ASSERT(pPage != NULL);
|       ASSERT_KINDOF(CPropertyPage, pPage);      < ---- HERE
|
|
| typically pPage=(memory){class PropPage hWnd=????}  
|
| (just checked - debug DLL has all the same settings but carries on
| regardless)
|
| However, with a release EXE and a debug DLL I get
| _AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
|       { ASSERT(afxCurrentResourceHandle != NULL);      <---- CRASH
|
|
|
| Is ther some reason why I can't mix and match release / debug
| components???
|
| Cheers, TIA etc;
| Si.
|



Fri, 03 Jun 2005 08:42:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DLL works fine in DEBUG but not in RELEASE mode

2. DLL works in debug but not in release...

3. Program not work at release mode but work at debug mode

4. VC6 Debug Build Works Fine - but Release Build Gives Error

5. Release version works differently then the debug version on VC6

6. Q: VC6 debug ok, release not

7. Page fault when compile using Release mode but not Debug mode

8. Q: ansi c in mfx exe (static linked) crashes in release, but not debug

9. ActiveX control in ATL property page does not work

10. Release/Debug, a DLL and the EXE !!

11. Property Page and double-click does not work?

12. Works in Debug mode but not in Release mode

 

 
Powered by phpBB® Forum Software