Unable to access instance of .NET object

2 views (last 30 days)
Clay
Clay on 5 Jan 2015
Hi all, I am writing a function that calls a C# wrapper which uses a library to access data on a server and returns that data to MATLAB as a simple array. Currently, I am able to add the .NET assembly and initialize a variable to access the correct class methods, but when I call the method I want to use, I get the error
Object reference not set to an instance of an object.
This is strange to me for two reasons. Matlab has an instance of my object variable listed in the workspace, and the very same test script works for other, simpler functions developed in the .NET framework.
Any thoughts as to what needs to be done in Matlab/.NET to get this running?
System: Windows 7 64 bit Matlab 2011b 64 bit
Code:
hissvc = NET.addAssembly(fullfile(pwd,'Datalayer.Service.dll'));
import Datalayer.Service.Implementation.*;
dls = Datalayer.Service.Implementation.DatalayerService();
output = dls.GetTagsDataInArray(ID, date1, date2, ...
itvl, descr);

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!