01-11-2006 10:03 AM
01-12-2006 04:15 AM
NumericArrayResize can allocate a new handle when passed in a NULL handle. And it is always a good idea to actually
@Tomi M wrote:
What's wrong when NumericArrayResize CIN function crashed. The weird thing is that it didn't crash until I recompiled my DLL made in Labview. The code crashes at NumericArrayResize call even if I don't call my labview DLL. I extracted the relevant parts of the code to below.
#include "extcode.h"
typedef struct {
long dimSize;
double Value[1];
} TD3;
typedef TD3 **TD3Hdl;
void NervusFile::Crash(void)
{
TD3Hdl dtHdl=NULL;
long channels = 32;
dtHdl= (TD3Hdl)(DSNewHandle(sizeof(TD3)));
NumericArrayResize(0x0A, 1, (UHandle *) &dtHdl, channels);
}
02-27-2010 03:44 AM
rolfk:NumericArrayResize can allocate a new handle when passed in a NULL handle.
I'm not shure you are right, please look here
02-27-2010 03:36 PM
kolan wrote:rolfk:NumericArrayResize can allocate a new handle when passed in a NULL handle.
I'm not shure you are right, please look here
Is there a bug in arrresize.c and in the documentation?
I'm not sure what you try to show in that other thread. For me it simply lacks any consistent theme and context.
But I'm 100% sure that the NumericArrayResize() function that is exported by the LabVIEW kernel will work properly with this code:
UHandle h = NULL;
MgErr err = NumericArrayResize(uB, 1, &h, size);
and allocate an according handle of size bytes.