विंडोज़ में, ctypes.cdll.msvcrt
ऑब्जेक्ट स्वचालित रूप से मौजूद है जब मैं ctypes मॉड्यूल आयात करता हूं, और यह msvcrt
माइक्रोसॉफ़्ट सी ++ रनटाइम लाइब्रेरी according to the docs का प्रतिनिधित्व करता है।ctypes में msvcrt के विभिन्न संस्करण
हालांकि, मुझे लगता है कि find_msvcrt फ़ंक्शन भी है जो "return the filename of the VC runtype library used by Python"
होगा।
यह आगे कहता है, "If you need to free memory, for example, allocated by an extension module with a call to the free(void *), it is important that you use the function in the same library that allocated the memory."
तो मेरे सवाल है, क्या ctypes.cdll.msvcrt
पुस्तकालय मैं पहले से ही है और वह है जो मैं find_msvcrt
समारोह के साथ लोड कर सकते हैं के बीच का अंतर है? किस विशिष्ट परिस्थितियों में वे एक ही पुस्तकालय नहीं हो सकते हैं?
संबंधित: [विंडोज़ पर पायथन में msvcrt तक पहुंचने के तरीकों के बीच मतभेद क्या हैं?] (Https://stackoverflow.com/q/30790494/4279) – jfs