I'm having trouble calling a dll in Python ... is giving the following error: WindowsError: exception: access violation reading 0x026A65F0, sometimes works without giving this error but most do not work. I'm using this way:
from ctypes import *
dll = cdll.LoadLibrary(".dll")
dll.funcao.artypes = (c_char_p, c_char_p, c_char_p, c_char_p)
dll.funcao.restypes = c_int
dll.funcao(cast(Nome_Arq,c_char_p),
cast(Entrada,c_char_p),cast(iv,c_char_p),cast(chave,c_char_p))
main.h
extern "C" DLL_EXPORT int funcao(char * Entrada, char * Saida, char* iv, char* chave);
main.cpp
extern "C" DLL_EXPORT int funcao(char * Entrada, char * Saida, char * iv_aux, char* chave_aux){
}