none
Get 80020009 Error while add custom properties with "CustomDocumentProperties" RRS feed

  • Question

  • I make a sample as http://support.microsoft.com/kb/238393. It works properly.

    And it also works if I wrote as follows(Pseudo code):

    ...

    {

    AutoWrap(DISPATCH_METHOD, NULL, pCustomProps, L"Add", 4, L"TagValue1",parm3, parm2, L"TagName1");

    AutoWrap(DISPATCH_METHOD, NULL, pCustomProps, L"Add", 4, L"TagValue2",parm3, parm2, L"TagName2");

    AutoWrap(DISPATCH_METHOD, NULL, pCustomProps, L"Add", 4, L"TagValue3",parm3, parm2, L"TagName3");

    AutoWrap(DISPATCH_METHOD, NULL, pCustomProps, L"Add", 4, L"TagValue4",parm3, parm2, L"TagName4");

    }

    ...

    How ever it didnot work it the code as follows:

    ...

    for (int i=0; i < 100000; i++)

    {

    AutoWrap(DISPATCH_METHOD, NULL, pCustomProps, L"Add", 4, param4[i],parm3, parm2, L"TagName1");

    AutoWrap(DISPATCH_METHOD, NULL, pCustomProps, L"Add", 4, param4[i],parm3, parm2, L"TagName2");

    AutoWrap(DISPATCH_METHOD, NULL, pCustomProps, L"Add", 4, param4[i],parm3, parm2, L"TagName3");

    AutoWrap(DISPATCH_METHOD, NULL, pCustomProps, L"Add", 4, param4[i],parm3, parm2, L"TagName4");

    }

    ...

    The error code is 80020009, and it always occur when i=1;

    Who knows what the cause is?


    brouno

    • Moved by Sheng Jiang 蒋晟 Tuesday, December 4, 2012 11:45 PM English (From:Visual C++)
    Monday, December 3, 2012 6:35 AM

All replies