System.AccessViolationException a l'appel d'une dll native
Salut, j'ai un binding de la dll native openal : Tao.Openal.
Je veux appeler la fonction Alc.alcGetString (IntPtr device, Int32 attribut) qui permet de récuperer une lsite de device disponible, en passant un pointeur null au premier argument.
Comme ceci
Code:
string listDevice =Alc.alcGetString( IntPtr.Zero, Alc.ALC_DEVICE_SPECIFIER);
En appelant la fonction de cette façon j'ai le droit à une ViolationException :
Citation:
An attempt to read or write memory protected. This indicates that another often memory is damaged. At Tao.OpenAl.Alc.alcGetString (IntPtr device, Int32 attribut
Voila si vous voulez des informations complémentaires: demandez, je vois pas trop d'ou peut venir le bug.