Die Suche ergab 2 Treffer

von Falk0
Dienstag 16. Juni 2020, 11:22
Forum: Allgemeine Fragen
Thema: DLL mit ctypes ansprechen (typedef struct, typedef enum)
Antworten: 2
Zugriffe: 1267

Re: DLL mit ctypes ansprechen (typedef struct, typedef enum)

Ich habe das Problem nun soweit gelöst. Mit folgendem Code funktioniert es:

import sys
import ctypes
from ctypes import byref, c_uint8, c_int16, c_int32, c_uint32, c_double
from ctypes import c_int32 as c_enum

def wrap_function(lib, funcname, restype, argtypes):
"""Simplify wrapping ctypes ...
von Falk0
Montag 15. Juni 2020, 09:13
Forum: Allgemeine Fragen
Thema: DLL mit ctypes ansprechen (typedef struct, typedef enum)
Antworten: 2
Zugriffe: 1267

DLL mit ctypes ansprechen (typedef struct, typedef enum)

Hallo,

ich stehe gerade vor dem Problem eine DLL mithilfe von ctypes ansprechen zu müssen. Diese DLL hat viele verschiedene Attribute wovon ich die einfachen schon erfolgreich ansprechen konnte. Bei den etwas komplizierteren mit "typedef struct / enum" komme ich gerade nicht weiter.

Das ist der C ...