关于快捷方式创建方法的问题 [英] Question about method of shortcut creating

查看:98
本文介绍了关于快捷方式创建方法的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

众所周知的方法using IWshRuntimeLibrary;在应用程序目录中需要"Interop.IWshRuntimeLibrary.dll",这对于重新分发不是很方便,因此是否可以在没有外部dll的情况下创建快捷方式?

http://stackoverflow.com/questions/234231/creating-application-shortcut-in-一个目录 [^ ]


我想,问题的症结在于您要避免分发互操作DLL.互操作DLL基本上具有COM接口的存根,使您可以使用它们通过RCW直接访问那些COM库.

如果执行手动COM互操作,则可以避免这些自动生成的RCW DLL.但这意味着您将必须手动声明所需的COM接口,并用所需的GUID标记它们.

完成此操作后,您可以手动创建COM对象,然后使用它们(语法会不太顺畅,但是没什么大不了的.)


Well known method using IWshRuntimeLibrary; requires "Interop.IWshRuntimeLibrary.dll" in application directory, that is not very handy for redistribution, so is there a way to create shortcut without external dll''s ?

解决方案

Are you trying to create a shortcut for your application? If so, does this SO entry helps?

http://stackoverflow.com/questions/234231/creating-application-shortcut-in-a-directory[^]


I suppose, the crux of your question is that you want to avoid distributing the interop DLLs. The interop DLLs basically have stubs for COM interfaces that let you use directly access those COM libraries via RCW.

If you do manual COM interop, you can avoid these auto generated RCW DLLs. But this will mean you will have to manually declare the required COM interfaces and mark them with the required GUIDs.

Once you do that, you can then manually create the COM objects and then use them (the syntax will be a little less smooth, but it''s certainly not that big a deal).


这篇关于关于快捷方式创建方法的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆