Author Topic: C++ theElement.SetNotes problem  (Read 3178 times)

henrygev

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
C++ theElement.SetNotes problem
« on: January 30, 2006, 01:24:21 pm »
Hi

I am interfacing the EA from a C++ application.

Currently theElement.SetNotes(COleVariant("STRING"));

Will throw
Unhandled exception at 0x7c2e7c97 (mfc71d.dll) in EA2ReqProSynch.exe: 0xC0000005: Access violation reading location 0xcccc0008.

inside
COleDispatchDriver::InvokeHelperV
{
...
case VT_VARIANT:

*pArg = *va_arg(argList, VARIANT*);<<<
break;
...
}

any ideas?

Thanks ahead
Henri

P.S.

void SetNotes(VARIANT propVal)
{
 SetProperty(0xd, VT_VARIANT, propVal);
}

henrygev

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: C++ theElement.SetNotes problem
« Reply #1 on: January 30, 2006, 05:50:15 pm »
I am not sure but after following changes it started working (changes)

in my code

theElement.SetName((LPVARIANT)COleVariant
("string"));

in Element.h file

void SetName(VARIANT *  propVal)
{
   SetProperty(0x1, VT_VARIANT, propVal);
}