COleSafeArray with ints and strings
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: COleSafeArray with ints and strings

  1. #1
    Join Date
    Dec 2009
    Posts
    1

    COleSafeArray with ints and strings

    Hello everybody,

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

    Code:
    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

    LexyK

  2. #2
    Join Date
    Feb 2005
    Posts
    2,160

    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

This is a CodeGuru survey question.


Featured


HTML5 Development Center