Showing results for 
Search instead for 
Did you mean: 
1 View

COM-server returning (safe)array of BSTR works under 32 bits but not under 64


I have created a COM server with the wizard. This COM-server returns [out, retval] SAFEARRAY(BSTR)* VALUE

When I build this for a 32-bits platform it works fine and I can call this array from several 32-applications

However when I build this for a 64-bits platform it doesn't work. A Delphi-client gives " (EVariantArrayLockedError: Variant or safe array is locked)" and Powershell crashes when I try to access the array. Besides all other properties and methods are working under 32 as well 64 bit.

Does anyone have an idea where to look for the failure



Aid Usman 


0 Kudos
1 Reply
1 View

What I usually do is set

What I usually do is set breakpoints in the generated wrapper routines (they're just Fortran sources in the "Do Not Edit" virtual folder) and step through the routine, checking for things such as lengths and indexes. We know of a problem with array indexing - see here, but that isn't a BSTR issue. My guess is that memory is being corrupted somewhere.

Retired 12/31/2016
0 Kudos