many thanks for your help. You are right, the Version and Serial string sets are not important, so I simply avoid accessing them and it finally works. Great! Your advice really saved me a lot of trouble.
Best regards, Erik
"Philip Borghesani" <email@example.com> wrote in message <firstname.lastname@example.org>... > Erik > I think you are on the correct path with the second approach if the init function is retuning 0 for output then it worked and you > can probably ignore the sets of return strings that may not properly be translated back into MATLAB. I would suggest using this > code that does not use an extra libpointer object: > > > if not(libisloaded('USMCDLL')) > loadlibrary('USMCDLL','USMCDLL.h') > end > Devices_st=libstruct('USMC_Devices_st'); > Devices_st.NOD=0; %Initialize at least one member of the structure. > retval=calllib('USMCDLL', 'USMC_Init', Devices_st); > > now just check the retval for 0 and NOD to see if it changed to a valid number > Devices_st.NOD > > Accessing the sets of strings may not work. > > Now just go on usinge the device. > > Phil > >