ok... I'm on the good way, the second call crashs because I misunderstood the syntax, it needs absolute pathway...
local $dll=DllOpen ( "ID3v2Library.dll" )
;~ # ID3v1_Create(): Pointer; stdcall;
$tagpointer=DllCall($dll,"ptr","ID3v2_Create")
ConsoleWrite ("ID3v2_Create " &@error &@CR)
;~ # ID3v2_Load(Tag: Pointer; FileName: PChar): Integer; stdcall;
DllCall($dll,"int","ID3v2_Load","ptr",$tagpointer,"str",'"'&@ScriptDir&'\input.mp3"' )
ConsoleWrite ("ID3v2_Load " &@error &@CR)
;~ Set Title ; ID3v2_SetAsciiText(Tag: Pointer; FrameName, Text: PChar): Boolean; stdcall;
$structchar=DllStructCreate("char[60]")
DllStructSetData($structchar,1,"Some title")
DllCall($dll,"byte","ID3v2_SetAsciiText","ptr",$tagpointer,"str","TIT2", "ptr",DllStructGetPtr($structchar,1)) ; crashs again..
ConsoleWrite ("ID3v2_SetAsciiText " &@error &@CR)
;~ # ID3v2_Free(Tag: Pointer): Boolean; stdcall;
DllCall($dld,"byte","ID3v2_Free","ptr",DllStructGetData ($struct_fichier,1) )
MsgBox(0,"ID3v2_Free" ,@error &@CR)
DllClose($dll)
This time it the third call which crashes : Is anything incorrect in my autoit syntax ?
By the way, I don't kown in autoit dllcall, it's the same thing to use :
"str", "a string"
and to use DllStructCreate("char[60]"), then to pass a pointer using
"ptr", DllStructGetPtr ?