问题
Every time I try to load DLL (COM) I get the following error:
LDR: LdrpWalkImportDescriptor() failed to probe for its manifest, ntstatus 0xc0150002
I searched a lot but found nothing. Please I really believe in this site experts and I hope to get a solution to this problem.
I know that the problem is from manifest file but I really don't know what is it and how to fix this
I use VS2010 C++ and LoadLibrary
回答1:
This is the description of the error code from ntstatus.h:
//
// MessageId: STATUS_SXS_CANT_GEN_ACTCTX
//
// MessageText:
//
// Windows was not able to process the application binding information.
// Please refer to your System Event Log for further information.
//
#define STATUS_SXS_CANT_GEN_ACTCTX ((NTSTATUS)0xC0150002L)
Look in the Windows event log for further information. A very common mishap is that the CRT runtime library that the DLL needs is not installed in your machine. Post what you see there in your question if that doesn't help. Or contact the COM component vendor or author for support, best way.
回答2:
Com dlls are not loaded with loadlibrary. The system loads them itself when you do CoCreateInstance for object implemented in library.
The problem seems to be that dlls on what the com dll depends are missing.
回答3:
The first and second links that Google produces for this error both suggest it is commonly caused by runtime library versioning. Both predate VS2010, but I would start by looking for a similar problem. Have you tried duplicating the analysis steps described in that first post?
(Is the DLL something that you have created? If not, maybe it actually was built with VS2008 and corresponds exactly to that post? If so, maybe you can try the compilation tweaks recommended there.)
来源:https://stackoverflow.com/questions/5850273/can-not-load-a-dll-file