Hi everybody!
I have a DCOM COM-object where I store addressdata in a CComBSTR* m_address.
I allocate memory like this.
_Module.m_address = new CComBSTR[*maxIndex];
And fills it with addresses.
At a certain point I need to reinitiate because I get a new addresslist. Then I use delete like this in a reInit-function.
delete[] _Module.m_address;
_Module.m_address = new CComBSTR[*maxIndex];
This works fine to reinit two times but the third time it fails. It's not the correct data in the COM-object. And the way I insert/take out data is not the problem. I'm sure of that.
I can't figure it out why delete stops to work. Plzzzz I need to fix this.
Thanx
Pete
I have a DCOM COM-object where I store addressdata in a CComBSTR* m_address.
I allocate memory like this.
_Module.m_address = new CComBSTR[*maxIndex];
And fills it with addresses.
At a certain point I need to reinitiate because I get a new addresslist. Then I use delete like this in a reInit-function.
delete[] _Module.m_address;
_Module.m_address = new CComBSTR[*maxIndex];
This works fine to reinit two times but the third time it fails. It's not the correct data in the COM-object. And the way I insert/take out data is not the problem. I'm sure of that.
I can't figure it out why delete stops to work. Plzzzz I need to fix this.
Thanx
Pete