2009-11-17 68 views
1

这是详细的错误信息。System.Runtime.InteropServices.COMException:未知错误(0x80005000)

失败: System.Reflection.TargetInvocationException:异常已被调用的目标抛出。 ---> System.Runtime.InteropServices.COMException:未知错误(0x80005000) at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_NativeObject ()导致上述异常

代码:

DirectoryEntry de1 = new DirectoryEntry("RNA:"); 
IRnaNamespace rnaNamespace = (IRnaNamespace)de1.NativeObject; 

德尔对象被创建之后,我尝试观看变种德尔的值,这为t他的结果如下: link text alt text http://lh4.ggpht.com/_ZgKaPEWP-AM/SwEIByd3XiI/AAAAAAAAAtE/ljuXhGUWd4g/s912/Untitled.png

操作系统是Windows2008 R2 64位。它可以在Windows2008Sp2 32bit上成功运行。

回答

0

错误是由下面的语句引起的:

DirectoryEntry de1 = new DirectoryEntry("RNA:"); 

因为它会调用另一个项目AAA这是建立在32位系统中创建的目录。以64位重建AAA后,一切正常。