Last active
December 25, 2016 09:27
-
-
Save constructor-igor/6489a24dbaf8e5ec0f7751e8a23a700a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function obj = LoadNetDll() | |
dllPath = '<full path to folder with .NET dll>\'; | |
if isdir(dllPath) | |
dllPath = fullfile(dllPath,'<.NET dll name>.dll'); | |
end | |
a = NET.addAssembly(dllPath); | |
t = a.AssemblyHandle.GetType('<full .NET class name>'); | |
obj = System.Activator.CreateInstance(t); | |
obj.SetDllsPath(dllPath); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment