开发者

System.Runtime.InteropServices.COMException: Unknown error (0x80005000)

开发者 https://www.devze.com 2022-12-11 20:40 出处:网络
This is the detailed error info. Failures: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: U

This is the detailed error info.

Failures: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Unknown error (0x80005000) at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_NativeObject()

Code that causes the above exception:

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

After the del object is created, I try to watch the values for variant del, an开发者_开发百科d this is the result: link text alt text http://lh4.ggpht.com/_ZgKaPEWP-AM/SwEIByd3XiI/AAAAAAAAAtE/ljuXhGUWd4g/s912/Untitled.png

The OS is Windows2008 R2 64bits. And it can run successfully on Windows2008Sp2 32bit.


The error is caused by the following statement:

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

Because it will call another project AAA which is built in 32 bits system to create the directory. After rebuilt AAA in 64 bits, everything is OK.

0

精彩评论

暂无评论...
验证码 换一张
取 消