> typedef struct {
>       long dimSize;
>       double elt[1];
>       } TD3;
> typedef TD3 **TD3Hdl;
> 
> TD3Hdl *Tach
> 
> noErr = NumericArrayResize(fD, 1, Tach, 80000);
> 
> ..
> 
> It does not compile i get the following error:-
> 
> error C2664: 'NumericArrayResize' : cannot convert parameter 3 from
> 'TD3 ***  ' to 'unsigned char ***  '
> 

Just as with malloc, it isn't odd to need to cast to get from the 
allocation to the pointer where it is stored.

You do want to use NumericArrayResize or DSNewHandle/DSSetHandleSize 
functions.  The DS functions take void and don't typically need casting, 
but the NumericResize apparently does.

I don't have the documentation in front of me, but if you make a local 
with value of zero/null, and pass the address of the local into 
NumericArrayResize, it should work fine.  Make sure to either assign the 
handle into something given to LV or to dispose of it yourself.

Greg McKaskle


Reply via email to