問題:
我在學習編程過程中,在ocx靜態調用Dynamic Link Library,鏈接提示錯誤:Project:error PRJ0050:未能注冊輸出。請嘗試啟用“每個用戶的重定向”,或用提升權限從命令提示窗口中注冊該組件。以為是win7中權限問題,可以看了屬性沒什么問題?
解答:
根據所述,肯定不是權限問題,而是由於在ocx中引用的dll,沒有放在生成ocx控件的目錄中,鏈接就出現了找不到的提示信息。
另外查詢的資料供參考如下:
[c++]"Project : error PRJ0050: 未能注冊輸出。請確保您有修改注冊表的相應權限"錯誤的解決
原創空間, 軟件技術, 電腦與網絡
邢紅瑞 發表於 2007-9-24 19:49:39
使用vs 2005寫ocx控件,一個字 爽,遇到Project : error PRJ0050: 未能注冊輸出。請確保您有修改注冊表的相應權限錯誤的解決 很不爽。
看了半天,我是管理員權限,刪除debug也不行。Project : error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry真是麻煩。
只好一步一步看作了哪些改動,發現調用了一個dll。這個lib我已經#pragma comment(lib,"tmdApi.lib"),刪除dll的調用就行,考慮一下,只好把dll cpoy到output directory目錄就行了。所有第三方的dll放在一起,然后注冊。
發現在當前目錄, %windir%, %windir%\system32都可以。
微軟也夠害人的
http://msdn2.microsoft.com/en-us/library/ms235584(vs.80).aspx
Project Build Error PRJ0050
Error Message
Failed to register output. Please ensure you have the appropriate permissions to modify the registry.
The Visual C++ build system was not able to register the output of the build (dll or .exe). You need to be logged on as an administrator to modify the registry.
If you are building a .dll, you can try to register the .dll manually using regsvr32.exe, this should display information about why the build failed.
If you are not building a .dll, look at the build log for the command that causes an error.
本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/qinlicang/archive/2009/07/02/4315318.aspx
Javascript調用ActiveX對象
http://www.csharpwin.com/dotnetspace/10222r1592.shtml