Problem having acces to libpointer value



Hello everyone,

I NEED HELP. I'm getting crazy by trying to get access to the value
of libpointer return by a dll function from library furnished by the
manufacturer of USB2000 spectrometer (by Oceans OPtics Incs).

Here is my program:

if ~libisloaded('ooidrv32','OOIDrv32')
loadlibrary('OOIDrv32');
end

adcType = calllib('OOIDrv32', 'OOI_GetADCType');
setdatatype(adcType,'int16Ptr', 1, 1);
get(adcType,'Value')

When i debug the program, it runs very well till the last instruction
where matlab crashs and says 'Error with get(adcType,'Value'):
datatype and size should be defined'.

The function in C is supposed to return the adcType. Here is the
prototype:

short OOI_GetADCType()

When using libfunctions -full, here is what matlab says for that
function.

libpointer OOIGetADCType

So the function needs no input arguments. Some functions in the
library that have inputs arguments work well. That is i have easy
access to the value of libpointer by the same instruction. I'm
wondering if the problem for this function is that it does not
require input argument. And if so, how to overcome. I NEED HELP.

Thanks.
.