From dzzie at yahoo.com Wed Oct 4 13:39:26 2023 From: dzzie at yahoo.com (dzzie) Date: Wed, 4 Oct 2023 17:39:26 +0000 (UTC) Subject: [python-win32] VB6 Listbox methods fail through ROT In-Reply-To: <913951271.729047.1694983474121@mail.yahoo.com> References: <653964788.1468993.1694959901159.ref@mail.yahoo.com> <653964788.1468993.1694959901159@mail.yahoo.com> <913951271.729047.1694983474121@mail.yahoo.com> Message-ID: <1760367014.4870532.1696441166198@mail.yahoo.com> Wondering if anyone might have an insight on this. If we add a vb6 listbox to the ROT, and try to access it using GetObjectwe can not access any of its methods with an error "Member not found" import win32com.client form1 = win32com.client.GetObject('PyComTest.Form1') form1.caption = "hi from vb!!"? # works #form1.Move(0) #pywintypes.com_error: (-2147352573, 'Member not found.', None, None) List1 = win32com.client.GetObject('PyComTest.List1') #List1.AddItem('************************') #pywintypes.com_error: (-2147352573, 'Member not found.', None, None) List1.Clear() #pywintypes.com_error: (-2147352573, 'Member not found.', None, None) ------------------------------------------------------ as a sanity check both do work from vb script Set form1 = GetObject("PyComTest.Form1") form1.caption = "test" form1.Move(0) Set List1 = GetObject("PyComTest.List1") List1.AddItem "********* VBS SAYS HELLO ***************" Currently using a vb6 standard exe manually adding objects to the ROT, and python 311 exe to run the scripts externally. I have not yet tried with a vb6 activex exe. Most things do work like textboxes, form methods etc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From piyushdubey72090 at gmail.com Tue Oct 31 04:43:26 2023 From: piyushdubey72090 at gmail.com (Piyush Dubey) Date: Tue, 31 Oct 2023 14:13:26 +0530 Subject: [python-win32] Seeking help to understand building of Microsoft Appstore Python Message-ID: Greetings community, I am trying to load Python dynamic libraries to interface Python from an application that I am trying to develop. The Python version I am trying to load is the one available in the Microsoft AppStore. Now when I use the ? LoadLibraryExW? (which is a WIN32 API: https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexw) function to load the path. It throws an error having error code 5 implicating that access is denied. It could work if I forcefully take ownership (which is initially with ?TrustedInstaller?) and alter the permissions of the file to allow full control to the current user or permit administrator access, but this does not seem to be an authentic or secure workaround for the same. This is the path to the DLL I am trying to load. C:\Program Files\WindowsApps \PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\python39.dll In order to allow interfacing I also tried building CPython from the public repository (https://github.com/python/cpython) but I could notice that directory structure of CPython code built on Windows is different from the one seen for Microsoft Appstore installation. I want to understand how the Appstore version of Python is built and how is it different from the process adopted by the official website?s Python. So, is there a different way to build Python for Windows AppStore? If yes, can you please point me to the webpage which has instructions. Thanks and best regards, Piyush Dubey -------------- next part -------------- An HTML attachment was scrubbed... URL: