<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://technolog.nl/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>eprogrammer : Memory Storage Layout for Safe Arrays</title><link>http://technolog.nl/blogs/eprogrammer/archive/tags/Memory+Storage+Layout+for+Safe+Arrays/default.aspx</link><description>Tags: Memory Storage Layout for Safe Arrays</description><dc:language>en</dc:language><generator>CommunityServer 2.1 (Build: 60809.935)</generator><item><title>Howto loop through each element on a SafeArray with an unknown number of Dimensions?</title><link>http://technolog.nl/blogs/eprogrammer/archive/2007/09/23/Howto-loop-through-each-element-on-a-SafeArray-with-an-unknown-number-of-Dimensions_3F00_.aspx</link><pubDate>Sat, 22 Sep 2007 23:03:00 GMT</pubDate><guid isPermaLink="false">3420c8e2-8f96-4c4a-9e98-3bc38250dfb6:1248</guid><dc:creator>eprogrammer</dc:creator><slash:comments>0</slash:comments><comments>http://technolog.nl/blogs/eprogrammer/comments/1248.aspx</comments><wfw:commentRss>http://technolog.nl/blogs/eprogrammer/commentrss.aspx?PostID=1248</wfw:commentRss><description>&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;I thought that the subject &amp;lsquo;SafeArrays&amp;rsquo; were really from the previous age and&amp;nbsp;there was really nothing new about them, I could tell you , that was not already known. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;So sit back and listen, what I am going to tell you, has been decided, in a dark hole, were some Microsoft Nerds &lt;img src="http://technolog.nl/emoticons/emotion-3.gif" alt="Surprise" /&gt;&amp;nbsp;must have thought that our programmers&amp;#39; live was too easy. So they&amp;nbsp;modified the way the old variant arrays from the COM era were stored in memory.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;Which Windows editions are involved in this modification? I don&amp;#39;t know exactly. Anyway, Windows&amp;nbsp;64 bit edition (x64)&amp;nbsp;really is subject to this, while Windows 2003 x86 (32 bit) is not. And don&amp;#39;t worry too much, if you only use Ole Automation API calls, and not like I did, directly manipulated the SAFEARRAY storage area, your hard working code at your customers site, still should work&amp;nbsp;&lt;img src="http://technolog.nl/emoticons/emotion-1.gif" alt="Smile" /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;So, let&amp;rsquo;s figure what has changed by looking at the code below which very common.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;SAFEARRAYBOUND bounds[1];&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;bounds.cElements = 10;&lt;br /&gt;bounds.lLbound = 0;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;SAFEARRAY *psa = SafeArrayCreate(VT_VARIANT, 1, &amp;amp;bounds);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;This creates a variant array, that is compatible with scripting, similar to &lt;br /&gt;Redim myArray(9)&amp;nbsp;&amp;#39;&lt;span style="font-size:10pt;color:green;line-height:115%;font-family:'Courier New';"&gt; 0 to 9 is ten elements.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;But before the array storage memory layout modification that I&amp;#39;m talking about,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;LONG elSize = SafeArrayGetElementSize(psa); would return 16 (since sizeof(VARIANT) obviously equals that) but on Windows x64, this returns 24. Possibly, the alignment still is 16, but this makes me suspicious. Why did Microsoft change this? So I want to be sure it works&amp;nbsp;independently of the Windows version or future&amp;nbsp;features.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;color:green;line-height:115%;font-family:'Courier New';"&gt;// code below gives an impression how to loop through an &amp;lsquo;unknonn dimension sized Safe Array, in this case the variant type is VT_VARIANT. Don&amp;rsquo;t use it. It&amp;rsquo;s faulty now on modern Windows systems.&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;LONG lElements&amp;nbsp; = 0;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;for&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt; (LONG x = 0; x &amp;lt; cDims; x++)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SafeArrayGetLBound(psa, x + 1, &amp;amp;lbound);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SafeArrayGetUBound(psa, x + 1, &amp;amp;ubound);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lElements += (ubound - lbound + 1);&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;hr = SafeArrayAccessData(psa, &amp;amp;psadata);&lt;br /&gt;if (hr == S_OK)&lt;br /&gt;{&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;VARIANT *myvarray = static_cast&amp;lt;VARIANT *&amp;gt;(psadata);&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;for (LONG els = 0; els &amp;lt; lElements &amp;amp;&amp;amp; hr == S_OK; els++)&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;// do something easy with the element &lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;VARTYPE vt = myvarray[els].vt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SafeArrayUnaccessData(psa);&lt;br /&gt;}&lt;br /&gt;The code above, would work to go through all elements for &amp;ndash;any type of-SafeArray, VT_UI1, VT_BSTR, VT_VARIANT, because we assumed, for instance, that a VT_UI1, would be one byte long, isn&amp;rsquo;t it? And a BSTR Safe Array, would be a memory block, of BSTR pointers. And a VARIANT array, would have been a block of elements, consisting of VARIANTS.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;So the code above, just worked, and looks in fact, pretty simple, fast and elegant.&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;Why so? Because it avoided the task to construct the indices one by one, and to fetch the element by using SafeArrayGetElement(psa, rgindices, outputvalue). &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;&lt;br /&gt;This one surely works, but has two important disadvantages, &lt;br /&gt;1) when you deal with a known 3D or 2D sized-array, it&amp;#39;s easy to fill the rgIndices in a loop, but if the dimensions are unknown, it would be required to iterate through the elements by other means. So&amp;nbsp; you&amp;rsquo;re up to do some nasa stuff! &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span&gt;J&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;. &lt;br /&gt;2)&lt;span&gt;&amp;nbsp; &lt;/span&gt;SafeArrayGetElement is relatively slow, since it copies the out value and you need to release the output (such as variants and strings). It&amp;rsquo;s like pumping around lots of memory, especially when the array is huge. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;font face="Calibri"&gt;To get this working, I had to refresh my knowledge of some informatics school I did in the past, about simple math, about carry over on signed numbers. Since SafeArrays have different lowerbounds and upperbound ranges per dimension, you cannot simply multiply by a known row size, to initialize it. But anyway, to make a longer story shorter, and I might lack the correct choice of words, for things that I technically just &amp;lsquo;see&amp;rsquo;, I wrote the code for you. It&amp;rsquo;s pretty cool, I could not find such code through Google. &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:Wingdings;"&gt;&lt;span&gt;J&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;br /&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;Some tips. I decided to avoid reading the pointer to the safearray descriptor at all, because I saw some unexplainable swapping of rgsaBounds. Better use the API if there is one!&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;// assume psa to be of SAFEARRAY and this code is using ATL version 8&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;LONG cDims = SafeArrayGetDim(psa);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;//we &amp;lsquo;rebuild&amp;rsquo; the bounds by using the API, not by reading the psa structure directly to avoid unclear behaviour&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;br /&gt;&lt;font color="#000000"&gt;CTempBuffer&amp;lt;SAFEARRAYBOUND&amp;gt; psaBound(cDims);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;CTempBuffer&amp;lt;LONG&amp;gt; rgIndices(cDims);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;LONG dimPointer = 0; &lt;/font&gt;&lt;span style="color:green;"&gt;// our dimension pointer, we go from left to right to build up the rgIndices&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;LONG currentEl = 0, ubound, lbound;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;for&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt; (LONG x = 0; x &amp;lt; cDims; x++)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SafeArrayGetLBound(psa, x + 1, &amp;amp;lbound);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SafeArrayGetUBound(psa, x + 1, &amp;amp;ubound);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;psaBound[x].cElements = ubound - lbound + 1;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;psaBound[x].lLbound = rgIndices[x] = lbound;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span style="color:green;"&gt;// locking is not optional, it is needed.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;SafeArrayLock(psa);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;for&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;(;;) &lt;/font&gt;&lt;span style="color:green;"&gt;//termination is decided within the loop&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; (rgIndices[dimPointer] &amp;lt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;(LONG)psaBound[dimPointer].cElements + psaBound[dimPointer].lLbound) &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;VARIANT* pVar ;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;// use the fast version instead of SafeArrayGetElement!&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;hr = SafeArrayPtrOfIndex(psa, rgIndices, (&lt;/font&gt;&lt;span style="color:blue;"&gt;void&lt;/span&gt;&lt;font color="#000000"&gt;**)&amp;amp;pVar);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; (FAILED(hr))&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MYBAILOUT(hr);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;rgIndices[dimPointer]++; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;span style="color:green;"&gt;//this terminates the for as soon as we reached the last array element&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;&lt;font color="#000000"&gt; (++currentEl == lElements)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;span style="color:blue;"&gt;break&lt;/span&gt;&lt;font color="#000000"&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;// our carry on overflow stuff goes from left to right&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;span style="color:blue;"&gt;while&lt;/span&gt;&lt;font color="#000000"&gt;(rgIndices[++dimPointer]++ == &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;(LONG)psaBound[dimPointer].cElements + psaBound[dimPointer].lLbound)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;span style="color:green;"&gt;//reset previous cols to initial lowerbound from left to &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;span style="color:green;"&gt;// most right carry position&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;span style="color:blue;"&gt;for&lt;/span&gt;&lt;font color="#000000"&gt; (LONG z = 0; z &amp;lt; dimPointer; z++)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;rgIndices&lt;img src="http://technolog.nl/emoticons/emotion-47.gif" alt="Person" /&gt; = psaBound&lt;img src="http://technolog.nl/emoticons/emotion-47.gif" alt="Person" /&gt;.lLbound;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;// if carry has been done, we start counting on left again&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;dimPointer= 0;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;To visualise this, I think it&amp;rsquo;s usefull to dry test this using a matrix.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;Imagine, we have a script, that was created by your customer, in VBSCript and youre superpower, martian CPP needs to do something with this data. &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;So, the Customer code could be:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;Redim MyArray(3,2)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;How would our dynamic rgIndice be iterated?&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;rgIndices would follow this pattern.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;table cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse:collapse;border:medium none;"&gt;&lt;tr&gt;&lt;td style="padding-right:5.4pt;padding-left:5.4pt;padding-bottom:0cm;width:83.4pt;padding-top:0cm;background-color:transparent;border:black 1pt solid;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Left dimension&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:black 1pt solid;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Right dimension&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:black 1pt solid;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Absolute element position&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;3&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;3&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;4&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;5&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;6&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;3&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;7&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;0&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;8&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;9&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;10&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;3&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;2&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;11&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:black 1pt solid;width:83.4pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Calibri" size="3"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:3cm;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Calibri" size="3"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-right:black 1pt solid;padding-right:5.4pt;border-top:#f0f0f0;padding-left:5.4pt;padding-bottom:0cm;border-left:#f0f0f0;width:134.65pt;padding-top:0cm;border-bottom:black 1pt solid;background-color:transparent;"&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Calibri" size="3"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font color="#000000" face="Calibri" size="3"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;Of course, the algorithm, would go through any array, with any dimension.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;Now have much fun with this code, if you needed it in your code. Don&amp;rsquo;t forget to add error handling which I left out to keep it short. And sure, you could write some C# stuff, for your COM interop to deal with array marshaling as well.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font color="#000000"&gt;&lt;font face="Calibri"&gt;If this code was very useful for you, don&amp;rsquo;t forget to pay a visit to a component that uses this handy trick at &lt;a href="http://www.nieropwebconsult.nl/asp_session_manager.htm" title="ASP Session Manager"&gt;http://www.nieropwebconsult.nl/asp_session_manager.htm&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;img src="http://technolog.nl/aggbug.aspx?PostID=1248" width="1" height="1"&gt;</description><category domain="http://technolog.nl/blogs/eprogrammer/archive/tags/CPP/default.aspx">CPP</category><category domain="http://technolog.nl/blogs/eprogrammer/archive/tags/ATL/default.aspx">ATL</category><category domain="http://technolog.nl/blogs/eprogrammer/archive/tags/SafeArray/default.aspx">SafeArray</category><category domain="http://technolog.nl/blogs/eprogrammer/archive/tags/Memory+Storage+Layout+for+Safe+Arrays/default.aspx">Memory Storage Layout for Safe Arrays</category><category domain="http://technolog.nl/blogs/eprogrammer/archive/tags/C_2B002B00_/default.aspx">C++</category></item></channel></rss>