doudou Posted March 12, 2010 Share Posted March 12, 2010 It doesn't mean that. It's fourth element of the array, not third.Third would be number of bytes you specify to write.I meant from the perspective of the method signature where there are only three arguments, but I understand your point. However, the strange effect is still unexplained. UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE Link to comment Share on other sites More sharing options...
wraithdu Posted March 12, 2010 Share Posted March 12, 2010 IStream.Write() accepts the call and returns number of bytes correctly in the third parameter (meaning ULONG* is apparently a legal pointer here) but in the same time it messes up the buffer in the first parameter.It does not mean ULONG* is legal. One of the AIO devs would have to comment on their code, but I'm fairly certain it's an uncaught (or unreported) error. The doc says DllCall 'type of parameter', not DllCall syntax. * is syntax, not type. So my previous comments stand. Just don't do it. You have the correct interface declaration working, stop trying to figure out why your incorrect declaration is not working.And yes, in the context of this thread, all this is a load of crap. This thread is for discussing AIO itself, not your specific interface implementation. It should be moved elsewhere. Link to comment Share on other sites More sharing options...
ivan Posted March 25, 2010 Share Posted March 25, 2010 I am eternally in debt to you guys, monoceres, ProgAndy, trancexx, Kip, I really owe you one.Thx again. Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
doudou Posted March 28, 2010 Share Posted March 28, 2010 (edited) Could somebody from the glorious AIO team help me with the following problem: if I want to access directly IDispatch on a living AutoIt object (i.e. result of ObjCreate()) is it possible with AIO?My effort so far:expandcollapse popup#include "AutoItObject.au3" Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc") Func _ErrFunc() ConsoleWrite("! COM Error ! Number: 0x" & Hex($oError.number, 8) & " ScriptLine: " & $oError.scriptline & " - " & $oError.description & " (" & $oError.windescription & ")" & @CRLF) Return EndFunc ;==>_ErrFunc _AutoItObject_Startup() Dim $obj = ObjCreate("Scripting.Dictionary") ConsoleWrite("Accessing " & ObjName($obj) & @LF) Dim $tagIUnknown = "QueryInterface;" & _ "AddRef;" & _ "Release;" Dim $tagIDispatch = $tagIUnknown & _ "GetTypeInfoCount;" & _ "GetTypeInfo;" & _ "GetIDsOfNames;" & _ "Invoke;" Dim $pDisp = _AutoItObject_IDispatchToPtr($obj) If $pDisp Then Dim $objDisp = _AutoItObject_WrapperCreate($pDisp, $tagIDispatch) If IsObj($objDisp) Then ConsoleWrite("_AutoItObject_WrapperCreate() success" & @LF) Dim $tp = DllStructCreate("UINT") Dim $hr = $objDisp.GetTypeInfoCount("long", "ptr", Number(DllStructGetPtr($tp, 1))) ConsoleWrite("GetTypeInfoCount() returned: " & $hr[0] & ", ctinfo: " & DllStructGetData($tp, 1) & @LF) Else ConsoleWrite("_AutoItObject_WrapperCreate() failed" & @LF) EndIf $objDisp = 0 Else ConsoleWrite("_AutoItObject_IDispatchToPtr() failed" & @LF) EndIfThe script seems to do as intended but AutoIt crashes on exit with access violation:Exception Information Code: 0xc0000005 Flags: 0x00000000 Record: 0x0000000000000000 Address: 0x00000000770f4945 System Information Windows NT 5.1 Build: 2600 CPU Vendor Code: 756E6547 - 49656E69 - 6C65746E CPU Version: 000006FD CPU Feature Code: BFEBFBFF CPU AMD Feature Code: 00C7E824 Module 1 AutoIt3.exe Image Base: 0x00400000 Image Size: 0x00000000 Checksum: 0x000c1865 Time Stamp: 0x4b509352 Version Information Signature: feef04bd StrucVer: 00010000 FileVer: (3.3:4.0) ProdVer: (3.3:4.0)Am I overlooking something (again)?Edit:I think I figured that out, adding _AutoItObject_IUnknownAddRef($pDisp) after _AutoItObject_WrapperCreate() call eliminates the crash. Looks logical. Any comments are appreciated nevertheless. Edited March 28, 2010 by doudou UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE Link to comment Share on other sites More sharing options...
wraithdu Posted March 28, 2010 Share Posted March 28, 2010 That's the correct solution I think. It was crashing because both AutoIt and AIO were trying to release the same object on script exit. Adding the reference makes sure it is only released once. Link to comment Share on other sites More sharing options...
James Posted March 28, 2010 Share Posted March 28, 2010 Any chance you can provide the EXE in English too please? Thanks, James Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
ProgAndy Posted March 28, 2010 Author Share Posted March 28, 2010 (edited) Any chance you can provide the EXE in English too please?Thanks,JamesSorry, my WinRAR is not able to generate an english exe or I missed anoption. Anyways, it is not too difficult to understand the extractor:Annehmen -> accept licenseAblehnen -> decline (refuse?) licenseInstallieren -> Install (not really, only extract)Abrechen -> CancelDurchsuchen -> Browse for folderEverything else should be in English or is not important. Edited March 28, 2010 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
GMib Posted March 28, 2010 Share Posted March 28, 2010 Sorry, my WinRAR is not able to generate an english exe or I missed anoption. Anyways, it is not too difficult to understand the extractor:You can use open source software like 7zip (exe is bigger than winrar, archive is smaller)AutoItObject_v1.0.0.exeAutoItObject_v1.0.0.7z Link to comment Share on other sites More sharing options...
ProgAndy Posted March 29, 2010 Author Share Posted March 29, 2010 (edited) I know I can use another software, I just thought the archive-exe would be language independent. The next time I (or someone else creating the release) will use something else. Edited March 29, 2010 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
doudou Posted April 5, 2010 Share Posted April 5, 2010 I just can't find the answer: How do I declare type VARIANT (no pointer) for a return type of an interface method wrapped with _AutoItObject_WrapperCreate()? Let's say the method is defined in the IDL like this: VARIANT Keys(); What would be the representation of it in $tagInterface [_AutoItObject_WrapperCreate()] or in $sReturnType [_AutoItObject_WrapperAddMethod()]? "variant" as such doesn't seem to be a valid DllCall type but there are plenty of COM interfaces out there that use this as return type and AutoIt has to have some built-in handling for it, does AIO then? UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE Link to comment Share on other sites More sharing options...
trancexx Posted April 5, 2010 Share Posted April 5, 2010 I just can't find the answer: How do I declare type VARIANT (no pointer) for a return type of an interface method wrapped with _AutoItObject_WrapperCreate()? Let's say the method is defined in the IDL like this: VARIANT Keys(); What would be the representation of it in $tagInterface [_AutoItObject_WrapperCreate()] or in $sReturnType [_AutoItObject_WrapperAddMethod()]? "variant" as such doesn't seem to be a valid DllCall type but there are plenty of COM interfaces out there that use this as return type and AutoIt has to have some built-in handling for it, does AIO then? What COM interface method returned variant and AutoIt handled that internally giving you the 'value'? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
doudou Posted April 5, 2010 Share Posted April 5, 2010 What COM interface method returned variant and AutoIt handled that internally giving you the 'value'?In particular I was trying to access a third party component that exports only dispinterfaces, they have some propgets with VARIANT as return value. When AutoIt loads an object with similar interface f.i. ObjCreate("Scripting.Dictionary"), it looks like it transparently converts the returned VARIANT to AutoIt type. UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE Link to comment Share on other sites More sharing options...
trancexx Posted April 5, 2010 Share Posted April 5, 2010 You would have to use "ptr" and _AutoItObject_VariantRead() (for example) with wrapper. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
doudou Posted April 5, 2010 Share Posted April 5, 2010 You would have to use "ptr" and _AutoItObject_VariantRead() (for example) with wrapper.Thaks trancexx, I'll try that.@AIO team: I can't login anymore at http://autoitobject.origo.ethz.ch. Has something gone wrong on the site or did somebody just delete my account? I have to know that because if it was just an error I'd re-register, which would make no sense if I am unwanted there. UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE Link to comment Share on other sites More sharing options...
trancexx Posted April 5, 2010 Share Posted April 5, 2010 Why would you be unwanted?!? The whole Origo is choking on something currently. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
doudou Posted April 5, 2010 Share Posted April 5, 2010 Why would you be unwanted?!?Sometimes one wouldn't know and I hate getting on somebody else's nerves though it looks different from time to time...The whole Origo is choking on something currently.So what would you say, do I re-register or just wait up? UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE Link to comment Share on other sites More sharing options...
trancexx Posted April 5, 2010 Share Posted April 5, 2010 I think everything is ok now. I wasn't able to login too. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
doudou Posted April 5, 2010 Share Posted April 5, 2010 I think everything is ok now. Ok, I can login again now. But "everything" doesn't look ok, after submitting a comment on an issue I got: * warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/lib/origo-web/drupal/sites/all/modules/issue_tracker/comment.inc on line 410. * warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/lib/origo-web/drupal/sites/all/modules/issue_tracker/comment.inc on line 410. * warning: Invalid argument supplied for foreach() in /var/lib/origo-web/drupal/sites/all/modules/issue_tracker/comment.inc on line 413. UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE Link to comment Share on other sites More sharing options...
Collus Posted April 14, 2010 Share Posted April 14, 2010 This is a great job, i like it Link to comment Share on other sites More sharing options...
ProgAndy Posted May 5, 2010 Author Share Posted May 5, 2010 A new release is out!The new release 1.1.0 contains BugFixes, includes a DLLStruct-Object (quite similar to AIOStruct) and has an optimized size.The download is still located in the first post *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now