Jump to content

brisesel

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

brisesel's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Really nice UDF, thanks a lot.
  2. Hello, mozrepl was updated 5 years ago for the last time and since, the whole plugin API was changed. So, even if it's still possible to access firefox internals as it was, it would require a lot of code rewriting... I just tried to run mozrepl with waterfox (which still supports old plugins), but it erratic and buggy. Sometime even the built-in exemple don't work. So, i guess it's time to switch to something else...
  3. $tagpointer = $tagpointer[0] Thanks you all, there is the error ! I was tired and misunderstood DllCall return type (thought it returned directly the called function return value...)
  4. >>>picaxe Thanks, but in last ressort... this is a fight between me an this dll (and by the way this dll offers much more implementation) >>>trancexx In fact, dllcall crashes before returning anything, so... In fact, the main trouble is probably the type conversion from delphi : in this delphi code, ID3v2Tag is a pointer (the void pointer in c, "ptr" in autoit) PChar() returns a pointer to the string in argument (like char *p in c) (there is an explanation of delphi types there at the page bottom) I tried to translate this in autoit like this : local $dll=DllOpen ( "ID3v2Library.dll" ) $struc_ptr=DllStructCreate("ptr") DllStructSetData($struc_ptr,1,DllCall($dll,"ptr","ID3v2_Create") ) ConsoleWrite ("ID3v2_Create " &@error &@CR) ;~ # ID3v2_Load(Tag: Pointer; FileName: PChar): Integer; stdcall; DllCall($dll,"int","ID3v2_Load","ptr",DllStructGetData($struc_ptr,1),"str","input.mp3" ) ; <--- crash (yeah, in fact relative path should also works) ConsoleWrite ("ID3v2_Load " &@error &@CR) ;< ---never arrives thereoÝ÷ Ø9e ©ejëh×6"str", "some string" works (passes a pointer to the first char of the string), because only when I change "input.mp3" to something that don't exist, there is no execution error (all @error set to 0)(and no result of course...) (and the dll is not buggy because there is an delphi compiled exe working in example...) So, I actually think that something may be wrong in the way I tried to implement the delphi pointer, or the way I pass the pointer to ID3v2_Load. If you find what it is.... EDIT : misspelling
  5. reading the delphi source, your modification is right... But it makes ID3v2_Load crashing again. I think i will forget this dll. Anyway, thanks you.
  6. 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 ?
  7. Hi, I'm trying to use the ID3v2 Library : http://www.3delite.hu/..../id3v2library.html It's an id3v2 tag editing library that supports the stdcall calling convention. (I know there is an UDF able to tag mp3 without a dll, but a little more restricted). I have little experience manipulating the DllCall function. Here is the script : local $dll=DllOpen ( "ID3v2Library.dll" ) ;~ # ID3v1_Create(): Pointer; stdcall; $tagpointer=DllCall($dll,"ptr","ID3v2_Create") ConsoleWrite ("ID3v2_Create " &@error &@CR) ; returns 0 ;~ # ID3v2_Load(Tag: Pointer; FileName: PChar): Integer; stdcall; DllCall($dll,"int","ID3v2_Load","ptr",$tagpointer,"str","input.mp3" ) ; <--- crash ! ConsoleWrite ("ID3v2_Load " &@error &@CR) ;~ Set Title ; ID3v2_SetAsciiText(Tag: Pointer; FrameName, Text: PChar): Boolean; stdcall; DllCall($dld,"byte","ID3v2_SetAsciiText","ptr",$tagpointer,"str",'TIT2', "str","Some title") 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) It crashs with the second call. Did I use "ptr" the right way ? In comment, the Delphi function syntax. Here is the library usage example. I didn't translate InitID3v2Library* because it just seems to load the dll (but I never learnt delphi...) CODEUses ID3v2LibraryDefs;//* Should be in FormCreate() InitID3v2Library; ID3v2Tag := ID3v2_Create; ID3v2_Load(ID3v2Tag, FileName); //* Do whatever you want here... ID3v2_Save(ID3v2Tag, FileName); ID3v2_Free(ID3v2Tag); //* Should be in FormDestroy() FreeID3v2Library;
  8. humm... forget it. I just need to upgrade, there are build-in functions called DllCallback*** now...
  9. Hi all, Do someone still have au3CallBack.dll ? I can't find it in the forum. I need to call EnumChildWindows, and unless changes have been made to autoit since then, I don't know any other way to do so. Thanks a lot.
×
×
  • Create New...