Author: axtensaxtens
Date: Jul 2, 2008 08:49
G'day everyone
Using CVF 6.6 under Windows XP Pro:
I'm writing a COM DLL. I have two 2D allocatable arrays of VARIANT. In
one routine, I load data into the first array as VT_BSTRs using
SysAllocStringLen. In another routine, I TRANSPOSE that array into the
second 2D array. In a third routine, I store the contents of the
second array into a safearray for passing back to the caller.
The problem I have is that TRANSPOSE seems to mangle the destination
array in a weird way. The addresses that are allocated by
SysAllocStringLen do not change (I've checked that) but what is
pointed to appears to change. I know this because when I call
SysStringLen against ... %% VU %% PTR_VAL, I get a length that is quite
different to that of the original. What is even more perverse is that
some lengths are correct and some are not.
Below is debug output as the source code is now quite lengthy and
involved (though I'm quite happy to send it to you off-list):
|