How to iterate through SAFEARRAY **

前端 未结 2 1660
一生所求
一生所求 2021-01-11 17:07

how to iterate through C++ safearray pointer to pointer and access its elements.

I tried to replicate the solution posted by Lim Bio Liong http://social.msdn.micros

2条回答
  •  一向
    一向 (楼主)
    2021-01-11 17:52

    MSDN SafeArrayGetElement function gives you a code snippet on using SafeArrayGetElement to obtain individual object to array.

    SAFEARRAY structure and SafeArray* functions explain the available API.

    In ATL/MFC project you would want to use wrapper classes e.g. CComSafeArray to make things simpler and easier. See Simplifying SAFEARRAY programming with CComSafeArray on this.

提交回复
热议问题