CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009

    COleSafeArray with ints and strings

    Hello everybody,

    is it possible to set different data types in a COleSageArray?

    COleSafeArray saRet;
    DWORD numElements[2];
    numElements[0]= rowCount;   //Number of rows in the range.
    numElements[1]= colCount;   //Number of columns in the range.
    saRet.Create(VT_BSTR, 2, numElements);
    In the code above I have a COleSafeArray of Strings. But I need the first and the third column to be a integer-value (VT_R8).

    Tanks in advance


  2. #2
    Join Date
    Feb 2005

    Re: COleSafeArray with ints and strings

    I'm not sure I'm reading this right, but if you have more than one type, it is no longer an array. Perhaps you need a one-dimensional array of struct where the struct has various types as needed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.