Hello everyone!
Our company use NiceLabel product for printing labels. Product has option for integration with .NET API.
I just try to access .NET assembly SDK.NET.dll . I tried with .NET DLL importer but makes to many errors, so result is not usable. As you see on picture PrintEngine namespace and it's functions... are not imported.
Than I tried manual way:
Long ll_return
String ls_dll
string as_path
DotNetAssembly ics_ass
DotNetObject ics_obj
//Specifies a DLL in the relative path
as_path='C:\Program Files\NiceLabel\NiceLabel 2019\bin.net\SDK.NET.dll'
Ls_dll = as_path
//Instantiates the DotNetAssembly object
ics_ass = create DotNetAssembly
ics_obj =create DotNetObject
//Loads the DLL
Ll_return =ics_ass.LoadWithDotNetFramework(ls_dll)
//Checks the result
If ll_return < 0 then
Messagebox("Load "+ls_dll+" Failed", ics_ass.ErrorText)
Return ll_return
End if
ll_return = ics_ass.createinstance ("NiceLabel.SDK.PrintEngine", ics_obj)
if ll_return < 0 then
messagebox ("CreateInstance Failed", ics_ass.errortext)
return ll_return
end if
ics_obj.Initialize();
return ll_return
/////////////////////////////////////////////////////////////
Problem I have is that code
ll_return = ics_ass.createinstance ("NiceLabel.SDK.PrintEngine", ics_obj)
returns -1 with error message:
This is correct as SDK documentation of .NET assembly said that instance of PrintEngine could not be created and it doesn't have constructor event:
How to access this instance?
Does anyone know how to solve this or make any workaround?
Tomaz