I am planning to run a dll file for a certain SDK since I only have the dll file without headers available. I made a mex function and headers for the same via fucntion documentation. Although I am still facing a lot of errors for accessing the dll file. I have already cross verified the path multiple times. (error shown below)
I am not able to figure out whether it's something I am doing wrong? Any input is greatly appreciated :)
Cheers! Sushant
Error loading DLL: Property assignment is not allowed when the object is empty. Use subscripted assignment to create an array element. Property assignment is not allowed when the object is empty. Use subscripted assignment to create an array element. Error in App_Sushant_2/startupFcn (line 124) app.statusText.Text = errorMessage;
The code referred in the error message shows assigning a public property as app.dllHandle and has it code as follows: methods (Access = public) % Construct app function app = App_Sushant_2 app.dllHandle = []; try % Load the DLL and store the handle in dllHandle property app.dllHandle = loadlibrary(dllPath, headerFile); %'alias', 'Neurostimulator_HID_DLL_2' app.statusText.Text = 'DLL loaded successfully'; catch ex % Display error message if DLL loading fails errorMessage = sprintf('Error loading DLL: %s', ex.message); disp(errorMessage); app.statusText.Text = errorMessage; return; end