Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork324
P4DPython26
Note: This appears to no longer be an issue with recent versions of Python.
Python 2.6 and Python 3.0 rely on Microsoft C++ dynamic link libraries which are installedusing Side by Side installation and are no longer placed in the Windows System32directory.
This affects Delphi programs using P4D. The problem that will occur is that you willnot be able to load c-extensions such as _socket.pyd,_ctypes.pyd and the importing ofmodules such socket and ctypes will fail.
To resolve this you need to add a manifest to your Delphi application. Here is anexample of the manifest file that PyScripter uses.
FileXP_UAC.manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="PyScripter" type="win32"/> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b" language="*"/> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker"/> </requestedPrivileges> </security> </trustInfo> <asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> <dpiAware>true</dpiAware> </asmv3:windowsSettings> </asmv3:application></assembly>The key here is the dependency on Microsoft.VC90.CRT.
To use this manifest in Delphi you need to create a file say
FileXP_UAC.rc
1 24 ".\XP_UAC.manifest"then compile the file ito XP_UAC.res using brcc32.exe and link the resulting file into your application.