本文介绍了在DRM和WMP中显示错误检索具有CLSID的组件的COM类工厂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 嗨 我正在研究 DRM(数字版权)管理)和WMP(Window 媒体播放器)。 我添加了程序集Interop.WMRMOBJSLib.dll 当代码执行此行时,它会抛出错误 ie 检索具有CLSID的组件的COM类工厂 {76FB40C2-7B90-402A-867D-73747BF85F48 }由于以下错误而失败: 80040154。 这里我提到了代码。 ----------------------------------------- ------------------------------ WMRMOBJSLib.IWMRMChallenge objChallenge = new WMRMOBJSLib.WMRMChallengeClass(); //实例化挑战对象 objChallenge.Challenge = Request.Params [" challenge"]; string varClientInfo = objChallenge.ClientInfo; //来追溯客户信息 string varHeader = objChallenge.Header; //检索内容的标题信息 WMRMOBJSLib.IWMRMHeader objHeader = new WMRMOBJSLib.WMRMHeaderClass(); //到实例化标题对象 objHeader.Header = varHeader; string strContentID = objHeader.ContentID ; //检索播放文件的竞争情况 string indiVersion = objHeader.IndividualizedVersion; //如果在DRM标题中找不到ContentID ,则报告错误 if(strContentID == null) { ReportError("内容未找到。"); return; } //立即行动执行 string action = Request.Params [" action"]; ----------------- -------------------------------------------------- ---- 在一些文章中,我读过 Class not registered。 我检查了到regedit。 这里我提到使用.dll Interop.LICENSESERVERLib.dll Interop.WMRMOBJSLib.dll MySql.Data.dll 好好建议我,哪里有问题。 非常迫切。 请回复我。 谢谢 Asit Sinha Asit(SE - India)解决方案 错误0x80040154表示"未注册类"。这是一个安装问题,您使用的COM服务器未正确注册。您可以尝试使用Regsvr.exe whatever.dll来注册它。不确定这是否会起作用,也许DRM会妨碍。 编辑:既然你在64位.NET论坛中发布了这个,问题可能是你没有64位版本这个COM服务器。在这种情况下,您必须强制您的代码以32位模式运行。 Project + Properties,Build,Platform target = x86。 HiI am working on DRM (Digital right management) and WMP (Windowmedia player).I added assembly Interop.WMRMOBJSLib.dll While the code is executing this line then it throw the errori.e. Retrieving the COM class factory for component with CLSID{76FB40C2-7B90-402A-867D-73747BF85F48} failed due to the following error:80040154.Here I am mentioned the code. -----------------------------------------------------------------------WMRMOBJSLib.IWMRMChallengeobjChallenge = new WMRMOBJSLib.WMRMChallengeClass(); //Instantiate challengeObject objChallenge.Challenge = Request.Params["challenge"]; string varClientInfo =objChallenge.ClientInfo; //to retriveclient information string varHeader =objChallenge.Header; //to retrive the header information of the content WMRMOBJSLib.IWMRMHeaderobjHeader = new WMRMOBJSLib.WMRMHeaderClass(); //toinstantiate header object objHeader.Header = varHeader; stringstrContentID=objHeader.ContentID; //retrivesthe contentid of the file played string indiVersion =objHeader.IndividualizedVersion; //Report an error if ContentIDnot found in DRM headers if(strContentID == null) { ReportError("Contentnot found."); return; } //Get action currentlyperformed stringaction = Request.Params["action"]; -----------------------------------------------------------------------In few article I read Class not registered.I checkedinto regedit.Here I mentionedused .dll Interop.LICENSESERVERLib.dllInterop.WMRMOBJSLib.dllMySql.Data.dllSo kindly suggest me, where is problem.Its very urget.Kindly reply me.ThanksAsit SinhaAsit (SE - India) 解决方案 Error 0x80040154 means "Class not registered". That's an installation problem, the COM server you are using isn't registered properly. You could try Regsvr.exe whatever.dll to get it registered. Not sure if that will work, maybe DRM gets in the way.EDIT: since you posted this in the 64-bit .NET forum, the problem may be that you don't have the 64-bit version of this COM server. In which case you'll have to force your code to run in 32-bit mode. Project + Properties, Build, Platform target = x86. 这篇关于在DRM和WMP中显示错误检索具有CLSID的组件的COM类工厂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!