Sous Windows, l'objet ctypes.cdll.msvcrt
existe automatiquement lorsque j'importe le module ctypes et représente la bibliothèque d'exécution Microsoft C++ msvcrt
according to the docs. Cependant, je remarque qu'il y a aussi une fonction find_msvcrt qui va "return the filename of the VC runtype library used by Python"
.Différentes versions de msvcrt dans les types ctypes
Il indique en outre, "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."
Donc ma question est, quelle est la différence entre la bibliothèque ctypes.cdll.msvcrt
que je l'ai déjà et celui que je peux charger avec la fonction find_msvcrt
? Dans quelles circonstances particulières pourraient-ils ne pas être la même bibliothèque?
connexes: [quelles sont les différences entre les façons d'accéder à msvcrt en python sur Windows?] (Https://stackoverflow.com/q/30790494/4279) – jfs