why same ctypes code runs on win7, but not on win10?

oyster lepto.python at gmail.com
Fri Jun 19 04:30:54 EDT 2020


The attachment is a very simple code that uses the DLL from
https://github.com/ying32/govcl to create a GUI application. The code
runs on my python 3.6.10 64 bits with win7 64 bits, but failed on my
python 3.6.10 64 bits and python 3.7.5 with win10 64 bits, by saying
following message. What is the problem? Thanks.
```
vcl.Application_Initialize(Application)
OSError: exception: access violation reading 0xFFFFFFFF9BCEE490
```


```python
import ctypes

def main():
    vcl = ctypes.CDLL('liblcl.dll')

    Application = vcl.Application_Instance()
    vcl.Application_Initialize(Application)

    form = vcl.Application_CreateForm(Application, False);

    vcl.Application_Run(Application);

main()
```


More information about the Python-list mailing list