I'm passing a simple 2 dimensional array of numbers from Excel 2003 to/from a PB9 compiled DLL. And I'm doing it with code of the (simplified) form:
All works well. But what I really want to do is pass a Single precision array, not a Long array. So I change a couple of "minor" things as follows:
This crashes Excel every time I try to call it. I assume it's creating the array incorrectly and stomping all over Excel's memory map in some obnoxious way.
Does anyone recognize what I'm doing wrong here?
Thanks.
Bill
Code:
Sub Name alias "NAME" (byref y as Long) export dim y() as Long vbY = vbArrayFirstElement(y) redim y(RowLB to RowUB, ColLB to ColUB) as Long at vbY
Code:
Sub Name alias "NAME" (byref y as [B]Single[/B]) export dim y() as [B]Single[/B] vbY = vbArrayFirstElement(y) redim y(RowLB to RowUB, ColLB to ColUB) as [B]Single[/B] at vbY
Does anyone recognize what I'm doing wrong here?
Thanks.
Bill
Comment