Passing CComSafeArray<double> x, through a reference using x.GetSafeArrayPtr(). Destr

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • subhadeepghosh
    New Member
    • Aug 2013
    • 1

    Passing CComSafeArray<double> x, through a reference using x.GetSafeArrayPtr(). Destr

    I am trying to get CComSafeArray<d ouble> x, through a reference using x.GetSafeArrayP tr(). When the destructor calls ~CComSafeArray( ) throw(), I am getting the follwing debug assertion "Expression : (((HRESULT)(hRe s)) >= 0)". Is there a way to avoid it?

    For back ground, I am passing "x" into a C# Interface wrapper to determine the value based on C# project.

    C++ Code snippets:

    Code:
    CComSafeArray<double> x;
    CComSafeArray<double> y;
    
    if (!GetData(x.GetSafeArrayPtr(), y.GetSafeArrayPtr())
    
    {
    
    ASSERT (FALSE);
    
    }
    Last edited by Rabbit; Aug 29 '13, 08:09 PM. Reason: Please use code tags when posting code.
Working...