Error PRJ0050 - Failed to register output - Ensure you have permissions to modify the registry

This nasty looking error, you might get under VS 2005, often maybe more annoying than harmful. The scenario I describe below may not account for all occurrences of this error, but it might be rather frequent. When you start a project in most cases you rely on the wizard, and when building a COM component, the wizard will create and add an idl file to your project, and generate internal command to invoke MIDL compiler to produce a type library. Some developers don't always need the type library, or even the idl, because their component is specialized and don't need to be advertised to the general COM public. Thus, they may remove those. However, the wizard generated DllRegisterServer() function calls the module's DllRegisterServer() without specifying an argument for the optional BOOL bRegTypeLib, which then assumes its default value of TRUE. As a consequence, when RegSvr32.exe is invoked by the VS build tool, it tries to register also the type library, after registering the module's COM objects. The ATL code tries to locate the type library first inside the dll, and if that fails by locating the tlb file with the root name identical to the binary module. I have read some developers complain that the error may popup sometime and sometime not. It maybe that the tlb file might have been lingering in the folder from the previous compilations and thus was found. In any case to fix the problem provide explicitly FALSE as the argument to both DllRegisterServer(FALSE) and DllUnregisterServer(FALSE), if you don't have the type library.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值