> You might consider double-checking your message subjects before > responding. That's especially important when you read the digest. >
Oh dear, I am sorry. I hadn't twigged to how that worked. I have restored the original subject now, from my initial post. Hope that helps. > Blair Hall wrote: > > > > Can you show us your manifest? > > > > > > 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. :-( > > 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. > Just to be clear, I showed you the manifest that I have provided in my project, as recommended when distributing py2exe executables (see here: http://www.py2exe.org/index.cgi/Tutorial#Step521). Note too, that I have also tried the redistributable C runtime installer from Microsoft on the target machines, but that didn't change anything: if there is a version of msvcr90.dll in the Windows PATH, that gets used. The DLL itself has an embedded manifest (generated automatically by py2exe, with no help from me) I have now added that to the stackoverflow page, so you can see it. 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. > I don't follow. Surely sys.path has nothing to do with it? It is the LoadLibrary("msvcr90") call from _cytpes.pyd that seems to be the problem here and that is not using the sys.path (or is it?). For what its worth, here are some more of my own thoughts. I have used py2exe on another project that creates an EXE. This project also imports uuid (it basically imports the same stuff I am using now, but for a different application). In that case, the manifest seems to work as expected. So, I wonder what is different in the case of my DLL? Well one thing that I can think of is that the problem arises when registering the DLL as a COM server, using regsvr32. Could it be that Windows does not know to look for the manifest in the right place because it is regsvr32 that is running?!
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32