> typedef struct {
>       long dimSizes[2];
>       double Numeric[1];
>       } TD8;
> typedef TD8 **TD8Hdl;
> 
> TD8Hdl *spec_map;
> 
> DSSetHandleSize(*spec_map, sizeof(int32)*2 + 100*10*sizeof(double) );
> 
> Greg could you please explain what is wrong with this because i am
> still getting an "exception" error.

You are only giving a small snippet of code, but it looks like you have 
a variable, spec_map with an uninitialized value.  When calling 
DSSetHandleSize, you are dereferencing this variable and you are 
probably crashing right there, before you even make the function call. 
And if you get lucky and the value is able to be dereferenced, the DSSet 
function will be asked to resize a nonexistant handle and will hopefully 
return an error that the argument is invalid.

To allocate a handle, you use DSNewHandle which is used as *spec_map= 
DSNewHandle(size);

Normally you would be given a param where the handle is already 
allocated and just needs to be resized.  In that case, use the 
SetHandleSize.

Greg McKaskle


Reply via email to