繁体   English   中英

Silverlight应用程序中的3rd Party dll

[英]3rd Party dll in Silverlight application

我在Silverlight项目中尝试引用第三方dll。 我能够使用此dll并在测试WPF应用程序中引用它。 尝试在我的Silverlight应用程序中引用此同一个dll无法正常工作。 我正在使用automationFactory类来获取dll的句柄,但不确定是否正确执行了此操作。

dynamic btApp = AutomationFactory.CreateObject("BarTender.Application");

通过将Bartender.Application作为CreateObject方法中的参数,我可以获取dll的句柄,但是我担心它不是正确的dll。 如何引用我需要使用的特定dll。


dynamic btApp = AutomationFactory.CreateObject("BarTender.Application"); 
//dynamic btMessages = null; 
dynamic btFormat = btApp.Formats.Open("c:\\Temp/Format1.btw", false, "");
btFormat.SetNamedSubStringValue("testing", barcodeValue); 
btFormat.Print("Job1");
btFormat.Close(2);

Silverlight是与wpf完全不同的框架。 您需要获取为silverlight运行时构建的dll。

原因:WPF更集成到Windows / .net框架中。 该Dll可以引用系统调用。 Silverlight有自己的框架(.net框架的很小一部分)。


Silverlight 4:

如果要运送图书馆:这个家伙在这里解释


我不建议为此目的使用usint COM集成(我对Print()有所了解。也许DLL需要完整的.net框架。并不是所有的Silverlight用户都拥有该框架。如果使用WPF,那是最好的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM