Click here to Skip to main content
16,010,544 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Is it possible to use high res bitmaps? Pin
Christian Graus11-Sep-02 12:47
protectorChristian Graus11-Sep-02 12:47 
GeneralCListCtrl and wordwrap Pin
RK_200011-Sep-02 11:47
RK_200011-Sep-02 11:47 
GeneralRe: CListCtrl and wordwrap Pin
Gary R. Wheeler11-Sep-02 13:51
Gary R. Wheeler11-Sep-02 13:51 
GeneralGUIDGEN Pin
Anonymous11-Sep-02 11:45
Anonymous11-Sep-02 11:45 
GeneralRe: GUIDGEN Pin
Michael Dunn11-Sep-02 13:33
sitebuilderMichael Dunn11-Sep-02 13:33 
GeneralRadio Buttons on Property Sheets Pin
Sydney Liles11-Sep-02 11:41
Sydney Liles11-Sep-02 11:41 
GeneralRe: Radio Buttons on Property Sheets Pin
Gary R. Wheeler11-Sep-02 13:59
Gary R. Wheeler11-Sep-02 13:59 
Generalvtable pointer problem with static CList<> object Pin
Roger Allen11-Sep-02 11:39
Roger Allen11-Sep-02 11:39 
I am doing some more work on my article, and am having problems with a CList<> static object for one of my base classes.

// Its declared as follows in the .h file :
	static CList<CPlugInObject, CPlugInObject&>	m_PostPlugInMapList ;
// Its declared as follows in the .cpp file :
CList<CPlugInObject, CPlugInObject&> CPlugInMap::m_PostPlugInMapList ;


Now if I step into the constructor of this, its all OK.

But when I access this object in a member function like this:

CPlugInMap::m_PrePlugInMapList.AddTail(entry) ;


i get an assertion error in objcore.cpp at line 101

if (!AfxIsValidAddress(pOb, pOb->GetRuntimeClass()->m_nObjectSize, FALSE))
{
    TRACE0("ASSERT_VALID fails with illegal pointer.\n");
    if (AfxAssertFailedLine(lpszFileName, nLine))
        AfxDebugBreak();
    return;     // quick escape
}

And if I look at the pOb object, the vtable pointer is in deed NULL! But it shouldn't be!

A bit of background in this is that this code is from a library (.LIB only) which the application and a DLL both link against. So, I could possibly have 2 copies of the same static object, one in the app and one in the DLL.


So, do I have to make my library also have a DLL which both the APP and DLL link against to make sure I only get one copy of the object, or is there another way around this?

Any suggestions welcome!


Roger Allen
Sonork 100.10016

I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
GeneralRe: vtable pointer problem with static CList<> object Pin
Tomasz Sowinski11-Sep-02 23:49
Tomasz Sowinski11-Sep-02 23:49 
GeneralRe: vtable pointer problem with static CList<> object Pin
Roger Allen12-Sep-02 1:38
Roger Allen12-Sep-02 1:38 
GeneralMulti CD-ROM App Problem Pin
Scott Revis11-Sep-02 11:27
Scott Revis11-Sep-02 11:27 
GeneralRe: Multi CD-ROM App Problem Pin
Mike Nordell11-Sep-02 17:19
Mike Nordell11-Sep-02 17:19 
GeneralNon-Wizard CEdit Control Pin
JennyP11-Sep-02 10:40
JennyP11-Sep-02 10:40 
GeneralRe: Non-Wizard CEdit Control Pin
Ernest Laurentin11-Sep-02 11:20
Ernest Laurentin11-Sep-02 11:20 
GeneralRe: Non-Wizard CEdit Control Pin
JennyP11-Sep-02 12:05
JennyP11-Sep-02 12:05 
GeneralRe: Non-Wizard CEdit Control Pin
Ernest Laurentin11-Sep-02 18:38
Ernest Laurentin11-Sep-02 18:38 
GeneralCListCtrl: multi line report items, differing fonts Pin
JennyP11-Sep-02 10:39
JennyP11-Sep-02 10:39 
GeneralRe: CListCtrl: multi line report items, differing fonts Pin
Gary R. Wheeler11-Sep-02 14:14
Gary R. Wheeler11-Sep-02 14:14 
GeneralICopyHook and files... Pin
Anders Molin11-Sep-02 10:10
professionalAnders Molin11-Sep-02 10:10 
QuestionHow do I work with the '\' Pin
Jose Cruz11-Sep-02 9:51
Jose Cruz11-Sep-02 9:51 
AnswerRe: How do I work with the '\' Pin
spotofleopard11-Sep-02 9:58
spotofleopard11-Sep-02 9:58 
AnswerRe: How do I work with the '\' Pin
Tim Smith11-Sep-02 9:58
Tim Smith11-Sep-02 9:58 
GeneralRe: How do I work with the '\' Pin
Jose Cruz11-Sep-02 10:09
Jose Cruz11-Sep-02 10:09 
GeneralRe: How do I work with the '\' Pin
Ernest Laurentin11-Sep-02 11:11
Ernest Laurentin11-Sep-02 11:11 
Generalan XOR problem!!! Pin
ns11-Sep-02 9:39
ns11-Sep-02 9:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.