Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28469 Discussions

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

aid-usman
Beginner
498 Views

Hi,

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

 

Thanks

Aid Usman 

 

0 Kudos
1 Reply
Steven_L_Intel1
Employee
498 Views

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.

0 Kudos
Reply