IDS camera company literature informs that several of their camera *.dll's are to be used as assembly references, and there are also 15 *.dll's that are to be copied post-build into the C# project filespace, using 4 commands like: {copy "C:\Program Files\IDS\ids_peak\generic_sdk\api\binding\dotnet\x86_64\*.dll";"$(TargetDir)"}. I have been able to successfully use the assembly references and the copied post-build *.dll files in Visual Studio to interface to camera, and the test command "peak.Library.Initialize();" works fine there now.
I can sucessfully add the two reference files in Matlab by using modified NET.addAssembly commands, as done at
asm = System.AppDomain.CurrentDomain.GetAssemblies; % copies the Assemblies of the CurrentDomain into asm
if ~any(arrayfun(@(n) strncmpi(char(asm.Get(n-1).FullName), ...
'ids_peak_dotnet', length('ids_peak_dotnet')), 1:asm.Length))
A=NET.addAssembly(...
'C:\Program Files\IDS\ids_peak\generic_sdk\api\binding\dotnet\x86_64\ids_peak_dotnet.dll');
B=NET.addAssembly(...
'C:\Program Files\IDS\ids_peak\generic_sdk\ipl\binding\dotnet\x86_64\ids_peak_ipl_dotnet.dll');
end
but I do not know how to get Matlab to recognize the the 15 *.dll's which seem to include the methods, but cannot be introduced using NET.addAssembly commands. Those *.dll's do not have a manifest, so I get the followig error message when I attempt to use NET.addAssembly:
Error using dualcams (line 19)
Message: Could not load file or assembly
'file:///C:\Users\skimbel\Desktop\Camera Info Files\PostBuildDLL
files\ids_peak_ipl_dotnet_interface.dll' or one of its dependencies. The
module was expected to contain an assembly manifest.
Source: mscorlib
HelpLink:
If I do nothing with the 15 additional *.dll's, the message that I receive when I try the "peak.Library.Initialize();" command is
Message: The type initializer for 'vision_apiPINVOKE' threw an exception.
Source: ids_peak_dotnet
HelpLink:
This was very similar to the message I received in Virtual Studio before I got the post-build copy commands to work to move the 15 *.dll files into the Visual Studio project filespace:
"Unhandled exception. System.TypeInitializationException: The type initializer for 'vision_apiPINVOKE' threw an exception . . .
Unable to load DLL 'ids_peak_dotnet_interface' or one of its dependencies: The specified module could not be found."
How can I get Matlab to recognize and use these other 15 *.dll's?
Thanks, Steve K