Discussion:
[python-win32] python-win32 Digest, Vol 145, Issue 6
Blair Hall
2015-04-16 01:00:15 UTC
Permalink
----------------------------------------------------------------------
Message: 1
Date: Wed, 15 Apr 2015 10:57:34 -0700
Subject: Re: [python-win32] python-win32 Digest, Vol 140, Issue 1
Content-Type: text/plain; charset="utf-8"
_ctypes.pyd calls LoadLibraryA("msvcr90.dll") and a version of
msvcr90.dll is found in the Windows PATH, despite the fact that I have
included the correct version and a manifest, as described on the
internet in may places.
Is there is something wrong with the way that I have created my DLL?
I'm surprised at both of these actions. MSVCR90, from Visual Studio
2008, still uses the "side-by-side" loading mechanism. The operating
system is supposed to look in the version-tagged side-by-side
repository, not in the path nor in the local directory.
Can you show us your manifest?
--
Providenza & Boekelheide, Inc.
Thanks for taking a look.
I have put the contents of the manifest file at the bottom of this post:

http://stackoverflow.com/questions/29597999/incorrect-dll-is-loaded-from-windows-path-instead-of-manifest

My understanding was that the operating system should look for the
manifest, but, well, it doesn't seem to be doing that for me. :-(
Tim Roberts
2015-04-16 17:13:09 UTC
Permalink
You might consider double-checking your message subjects before
responding. That's especially important when you read the digest.
Can you show us your manifest?
Thanks for taking a look.
http://stackoverflow.com/questions/29597999/incorrect-dll-is-loaded-from-windows-path-instead-of-manifest
My understanding was that the operating system should look for the
manifest, but, well, it doesn't seem to be doing that for me. :-(
Well, here's the thing that makes this tricky. The manifest you showed
is associated with the library, not with your DLL. It is telling the
system which version of the CRT is included in your Microsoft.VC90.CRT
folder. But unless you have a manifest associated with your
application, there's nothing that tells the system to go look for that
specific version. By default, it will go searching for the newest one.

The side-by-side stuff is an abomination, which is why it was abandoned
in Visual Studio 2010.

One ugly alternative would be to edit sys.path in your code before you
start your imports. If you remove everything but the Windows
directories, that should solve the problem.

However, EVEN IF it finds the wrong DLL, I don't understand why you
would see a failure. If it found msvcr90.dll once, it should be able to
find it again and again. That confuses me.
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
Loading...