System.Runtime.InteropServices.COMException: Unknown error (0x80005000)
-
Monday, November 16, 2009 8:07 AM
This is the detailed error info.
FailuresSystem.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, and this is the result:
http://picasaweb.google.com/lh/photo/WFhTvRWS2w3TL-gad1OvuQ?feat=directlink
The OS is Windows2008 R2 64bits. And it can run successfully on Windows2008Sp2 32bit.
All Replies
-
Tuesday, November 17, 2009 3:38 PMModeratorHello
How do you declare the IRnaNamespace interface. I have the feeling that the IRnaNamespace interface does not handle 64bit values correctly.
If you change the code to
DirectoryEntry de1 = new DirectoryEntry("RNA:");
object rnaNamespace = de1.NativeObject;
Do you still see the problem? What's the value of rnaNamespace ?
Regards,
Jialiang Ge
MSDN Subscriber Support in Forum
If you have any feedback of our support, please contact msdnmg@microsoft.com.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. -
Wednesday, November 25, 2009 3:45 AMModeratorHello
How are you? Could you please update me about the current status of the issue? If you have any other questions, please feel free to post here.
Regards,
Jialiang Ge
MSDN Subscriber Support in Forum
If you have any feedback of our support, please contact msdnmg@microsoft.com.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. -
Wednesday, November 25, 2009 9:03 AM
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 enironment to create the directory. After rebuilt AAA in 64 bits, everything is OK.- Marked As Answer by Carlos Liu Wednesday, November 25, 2009 9:04 AM

