Hello Everyone,
I am in front of a subtleties related to transfer an integers array from a c++ com automation assembly to a vb.net winform application.
the array is defined in vb.net winform and the values are intialized inside the ole automation method. When the method returns to the main application to display the contents of the array, the defined values are lost. Something goes wrong in the heap it seems.
The complete sample application is available from the following link:
arraybounding
What could be the reason of my issue.
Thank you very much in advance.
Best regards.
MiQi
What I have tried:
have tried via a reference of the type library or late binding the effect is the same.
Here is the segmIent of the code I am trying to cover:
Private _Layer As Object = Nothing
Dim ArrValues(10) As Integer
_Layer.Generate(ArrValues(LBound(ArrValues)), UBound(ArrValues
BOOL CLayer::Generate(long FAR* IntegersArray, long Items)
{
for (long Index = 0; Index < Items; Index++)
{
IntegersArray[Index] = Index + 1;
}
return TRUE;
}