Jump to content

Recommended Posts

i'm developing a python script that i'm injecting using a python loader during the client runtime.

 

i need to import the ctypes library but I have encountered many problems

 

first i tried to import simply from script,believing that it is included in client

from ctypes import windll

and I got the error: 'No module named _ctypes'

 

after I tried to link the script with the python 2.7 libraries using:

sys.path.insert(0,'C:\\Windows\\SYSTEM32\\python27.zip')
sys.path.insert(0,'C:\\Python27\\DLLs')
sys.path.insert(0,'C:\\Python27\\lib')
sys.path.insert(0,'C:\\Python27\\lib\\plat-win')
sys.path.insert(0,'C:\\Python27\\lib\\lib-tk')
sys.path.insert(0,'C:\\Python27')
sys.path.insert(0,'C:\\Python27\\lib\\site-packages')

but i failed again, and now i got error: R6034: An application has made an attempt to load the C runtime library incorrectly.

followed by:

0204 03:26:37079 :: Traceback (most recent call last):

0204 03:26:37079 ::   File "<string>", line 27, in <module>

0204 03:26:37080 ::   File "system.py", line 184, in __hybrid_import

0204 03:26:37080 ::   File "C:\Python27\lib\ctypes\__init__.py", line 10, in <module>

0204 03:26:37080 ::     
0204 03:26:37080 :: from _ctypes import Union, Structure, Array

0204 03:26:37080 ::   File "system.py", line 184, in __hybrid_import

0204 03:26:37080 :: ImportError
0204 03:26:37080 :: : 
0204 03:26:37080 :: DLL load failed: A dynamic link library (DLL) initialization routine failed.
0204 03:26:37081 :: 

 

I hope someone else has encountered this and can help me.

Thank you in advance

 

  • Love 1
Link to comment
https://metin2.dev/topic/22787-importing-ctypes-in-python-script/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.