PRO Sample2 ; Define variables for the shared object and symbol parameters ; for LINKNLOAD. object = 'sample2' object = '.\sample2\Debug\' + object + '.dll' symbol = 'linknload_sample2' ; CREATE MAIN LEVEL VARIABLE --- Create a main level variable pvdata = FLTARR(2)+10 PRINT, 'Original value for PVDATA is:', pvdata ; CALL C FUNCTION --- Use LINKNLOAD to call the C function result = LINKNLOAD (object, symbol, /S_Value) Print,'len=',Strlen(result) Info,result ; PRINT RETURN VALUE --- Print return value from call to PRINT, 'New value for PVDATA is:', pvdata END