Title: GitHub · Where software is built
Open Graph Title: naksyn/PythonMemoryModule
X Title: naksyn/PythonMemoryModule
Description: pure-python implementation of MemoryModule technique to load dll and unmanaged exe entirely from memory - naksyn/PythonMemoryModule
Open Graph Description: pure-python implementation of MemoryModule technique to load dll and unmanaged exe entirely from memory - naksyn/PythonMemoryModule
X Description: pure-python implementation of MemoryModule technique to load dll and unmanaged exe entirely from memory - naksyn/PythonMemoryModule
Opengraph URL: https://github.com/naksyn/PythonMemoryModule
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TypeError: expected CFunctionType instead of int","articleBody":"while trying to load onnxruntime_pybind11_state.pyd in memory, it gives me error:\r\n```\r\nFile \"test.py\", line XXX, in build_import_table\r\n funcref.contents = GetProcAddress(hmod, cast(importordinal, LPCSTR))\r\n ^^^^^^^^^^^^^^^^\r\nTypeError: expected CFunctionType instead of int\r\n# I just copy \u0026 paste the content of __init__.py to test.py\r\n```\r\n\r\nSimple test code:\r\n```\r\nif __name__ == '__main__':\r\n import sys\r\n import importlib.util\r\n import importlib.metadata\r\n\r\n content = open('d:\\\\Python312\\\\Lib\\\\site-packages\\\\onnxruntime\\\\capi\\\\onnxruntime_pybind11_state.pyd', 'rb').read()\r\n dll = MemoryModule(data=content, debug=True)\r\n print('test for fun !')\r\n sleep(10)\r\n exit()\r\n```\r\n\r\ninstall onnxruntime module: (python 3.12.7)\r\n```\r\npip install onnxruntime-directml==1.19.2\r\n```\r\n\r\nBy the way, if test with `onnxruntime==1.19.2`, works fine\r\nFor '`onnxruntime-gpu==1.19.2`, it will just exit without printing\r\n\r\nFYI: python 3.11 version of onnxruntime-directml will have the same error","author":{"url":"https://github.com/JiaPai12138","@type":"Person","name":"JiaPai12138"},"datePublished":"2024-10-21T01:22:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/9/PythonMemoryModule/issues/9"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:a809a0b8-5c6b-be4f-d906-bfb4deea66e2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8308:E685E:213AF7:2CC9CE:698F6E99 |
| html-safe-nonce | 212856daa10452f09887d1c2b565537d4aaa00edbccbc8e2f4bdc0b55cae31a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzA4OkU2ODVFOjIxM0FGNzoyQ0M5Q0U6Njk4RjZFOTkiLCJ2aXNpdG9yX2lkIjoiMTkwOTExNTUxNDgxMjc4MTA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d540ac62a6f13017b2d1992aadca1f01f8108201160a228413420d6d55b4c301 |
| hovercard-subject-tag | repository:585501613 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/naksyn/PythonMemoryModule/issues/9 |
| twitter:image | https://opengraph.githubassets.com/4e112ef0b830fc2d1c2498ef8e158f51cf16f0ee5ba7d83e91217aa70df62577/naksyn/PythonMemoryModule |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4e112ef0b830fc2d1c2498ef8e158f51cf16f0ee5ba7d83e91217aa70df62577/naksyn/PythonMemoryModule |
| og:image:alt | pure-python implementation of MemoryModule technique to load dll and unmanaged exe entirely from memory - naksyn/PythonMemoryModule |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7ab1c9acb90dba91d5e994ebfb6bfb1130e0e0e6aca329cdbbd934d636e22ab6 |
| turbo-cache-control | no-cache |
| go-import | github.com/naksyn/PythonMemoryModule git https://github.com/naksyn/PythonMemoryModule.git |
| octolytics-dimension-user_id | 59816245 |
| octolytics-dimension-user_login | naksyn |
| octolytics-dimension-repository_id | 585501613 |
| octolytics-dimension-repository_nwo | naksyn/PythonMemoryModule |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 585501613 |
| octolytics-dimension-repository_network_root_nwo | naksyn/PythonMemoryModule |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d6695367a1b2f05addc4030b791720f01693df4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width