IPersistStreamInit->Load methos crashes in Win2k SP4 and in windows 2003 SP1

Hi
I have a procedure with following code fragment

IStream* pStm = NULL;

IPersistStreamInit *pPSI = NULL;

//pPSI and pStm are initialized here

hr = pPSI->Load(pStm);

above call crashes silently on win2k SP4 and on windows2003 SP1, but it works fine on XP SP2.

What can be the possible reason and solution for the problem.
Any Help will be appriciated. Thanks in advance.

 



Answer this question

IPersistStreamInit->Load methos crashes in Win2k SP4 and in windows 2003 SP1

  • TheAmiMan

    That means your implemantation of the IStream may not be correct. Make sure that you adhere all COM rules. In other words, make sure you implement QueryInterface, AddRef, Release methods properly.

    Regards,

    - Umut Alev - MSFT


  • John Kinghorn

    Hi Atul:

    I am experiencing a very similar problem but in a slightly different context. The code is very much similar. The code executes normally with MSXML 3.0 SP5, but crashes silently in MSXML 3.0 SP7. You indicated some problem with FileStream Class implementation, but could you please elobarate.

    Regards,

    Rao



  • Arthur

    Hi,
    The problem is resolved now.
    Bug was found with the FileStream class implementation.
    This FileStream is used by Load method.
    Thanks for Reply.

    Regards,
    Atul Nisar

  • jkrakowsky

    Atul,

    Could you please share a simple repro with c++ code and xml files The info that you have provided is not sufficient. Also mention which msxml and what version are you using on W2KSP4 and W2K3SP1

    Regards,
    Umut Alev

  • IPersistStreamInit->Load methos crashes in Win2k SP4 and in windows 2003 SP1