doudou Posted April 13, 2010 Posted April 13, 2010 (edited) When I was once confronted with a request of one of my customers to make an inventory of COM libraries installed on a number of computers without changing their state (i.e. without installing new software) I wrote a C program around ITypeInfo interface to accomplish this task. Now - after AutoItObject became available - I've ported the majority of the code to AutoIt. Undoubtedly, there is an ActiveX library from MS called TLBINF32.dll shipped with Visual Basic / Visual Studio that one could use directly from AutoIt but 1stly not everybody has licensed the mentioned products, 2ndly it is not redistributable and finally it requires designated installation. So here it goes. The UDF consists of 2 parts: TLIDirect and TLI. TLIDirect is a light-weight wrapper for ITypeInfo/ITypeLib interfaces from oleaut32.dll and allows to access all information OleView displays to user. It is fast and has small memory footprint but the data structures you have to deal with is in raw format, thus its interpretation requires more programming and some advanced skills. TLI on the other hand is built upon TLIDirect and represents programming interface very similar to that of TLBINF32, what you get here is basically the engine of the Object Browser used in Visual Basic. TLIDirect can be used standalone, to utilize TLI facilities you will need both. TLIDirect part is quite complete and fairly well documented, TLI is being yet developed and I haven't got to writing documentation on it, you can always consult Help file for TLBINF though - the differences are insignificant for most purposes and described here: TLI.AU3-vs-TLBINF32.html I attach usage examples for both UDF parts and as a demonstration of practical use: AIOWrapperGenerator - a little companion script for _AutoItObject_WrapperCreate(), you may also find TypeLibInspector interesting - a GUI application built around TLI. Enjoy. Version 1.0.8 Fixed compatibility issues with AutoIt 3.3.16.0 Version 1.0.7 Fixed minor errors Examples made more robust Version 1.0.6 TLI: fixed struct declaration for VT_SAFEARRAY elements TLIDirect: fixed bubbling of COM error codes Version 1.0.5 TLI: VT_SAFEARRAY handling adjusted to match other array types TLI: VarTypeInfo.IsExternalType properly implemented TLI: VarTypeInfo.ElementPointerLevel removed in favor of VarTypeInfo.PointerLevel Version 1.0.4 TLIDirect: access to ARRAYDESC fixed TLI: VarTypeInfo.ArrayBounds fixed Version 1.0.3 TLI: TypeLibInfo.LCID added TLI: TypeLibInfo.ContainingFile added TLI: TypeInfo.LCID added Version 1.0.2 TLIDirect: Au3Check warnings reduced TLI: Au3Check warnings reduced Version 1.0.1 TLIDirect: number/pointer conversion in _ITypeInfo_GetImplTypeFlags() fixed TLIDirect: missing PARAMDESCEX added TLI: debug output made conditional TLI: ParameterInfo.DefaultValue fixed AIOWrapperGenerator.zip au3_TLIDirect_1.0.8.zip au3_TLI_1.0.8.zip au3_TLIDirect_samples_1.0.8.zip au3_TLI_samples_1.0.8.zip Edited April 10, 2022 by doudou Version 1.0.8 released 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
ValeryVal Posted April 13, 2010 Posted April 13, 2010 Working! Thank you. OleView can generate .IDL file from TypeLib. Is there chance to get by ITypeInfo/ITypeLib interfaces the info about structures like these? 1. typedef enum { ... } 2. interface XXXXX : IDispatch { [id(0x60020000), propget, helpstring("Returns *********** name document")] HRESULT Name([out, retval] BSTR* Name); [id(0x60020001), propget, helpstring("Returns the application associated")] HRESULT Application([out, retval] _Application** Application); [id(0x60020008), propput, helpstring("Returns/sets the visibility")] HRESULT Visible([in] VARIANT_BOOL rhs); }; The point of world view
doudou Posted April 13, 2010 Author Posted April 13, 2010 Working! Thank you. Pleasure. OleView can generate .IDL file from TypeLib. Is there chance to get by ITypeInfo/ITypeLib interfaces the info about structures like these? 1. typedef enum { ... } 2. interface XXXXX : IDispatch { [id(0x60020000), propget, helpstring("Returns *********** name document")] HRESULT Name([out, retval] BSTR* Name); [id(0x60020001), propget, helpstring("Returns the application associated")] HRESULT Application([out, retval] _Application** Application); [id(0x60020008), propput, helpstring("Returns/sets the visibility")] HRESULT Visible([in] VARIANT_BOOL rhs); }; Of course it is possible, OleView uses exactly the same API to generate this. It is yet another way to "stringify" type information and one of my examples can be developed in this direction. But why would you want to mimic OleView? 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
ValeryVal Posted April 14, 2010 Posted April 14, 2010 But why would you want to mimic OleView?In the wake of OleView it would be useful to have definition in native IDL language, I think. And I have some autotools to rewrite definition of this kind directly into AU3 UDF. BTW 1. About your Usg_TLI_DumpTypeLib.au3. This WriteDump will be more quick than your one Global $sOutPut = "" .... ;put definition into clipboard ClipPut ($sOutPut) MsgBox(0,"","Done!") $objTypeInfo = 0 $objTypeLibInfo = 0 .... .... Func WriteDump($text, $lf = true) ConsoleWrite($text) If ($lf) Then ConsoleWrite(@LF) $sOutPut &= $text If $lf Then $sOutPut &= @LF EndFunc Using it user can just click {^V} to paste text in any text editor. 2. About AIOWrapperGenerator.au3 At first sight it isn't clear that GUID must be placed inside braces: {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} Thank you. The point of world view
doudou Posted April 14, 2010 Author Posted April 14, 2010 In the wake of OleView it would be useful to have definition in native IDL language, I think. And I have some autotools to rewrite definition of this kind directly into AU3 UDF. If I'd want native IDL I would use OleView (unless there are special circumstances that prohibit that) and spare the expenses. Generating UDF directly from a TypeLib is easier anyway without diversions via IDL.1. About your Usg_TLI_DumpTypeLib.au3. This WriteDump will be more quick than your one...Using it user can just click {^V} to paste text in any text editor. Thanks for pointing that out. However, the examples are not purposed to be productive applications - I wanted them to be as demonstrative as possible, performance wasn't a priority. Maybe, if I'm changing something anyway in the next release I will be optimizing them.2. About AIOWrapperGenerator.au3At first sight it isn't clear that GUID must be placed inside braces:{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}The expected input is either any known GUID of an interface/dispinterface or the interface name like IVideoWindow, IDictionary etc. If the interface is registered on the system it would be loaded from registry otherwise you will be asked to select a type library that contains the interface. 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
ptrex Posted April 14, 2010 Posted April 14, 2010 @doudouGenerating UDF directly from a TypeLib is easier anyway without diversions via IDLI am interested in seeing that how this is done ?Secondly. It would be nice to generate some kind of intellisence (au3.user.calltips.api) file,for SciTE based on an TypeLib file wouldn't it ?So we can have the methods and properties popup in SciTErgdsptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
doudou Posted April 14, 2010 Author Posted April 14, 2010 I am interested in seeing that how this is done ?Secondly. It would be nice to generate some kind of intellisence (au3.user.calltips.api) file,for SciTE based on an TypeLib file wouldn't it ?So we can have the methods and properties popup in SciTEThese all are interesting ideas. I personally don't have resources to forge every (useful) application but I am working on a generic approach: generating target independent XML from a TypeLib and in the second step applying custom XSL templates to produce desired output (could be IDL, Au3 UDF or whatever).In the mean time, don't you feel like getting involved? Why not start with that .api? I wouldn't be the right person to implement that anyway - as I don't use Scite - but I will gladly provide TLI support wherever I can. 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
ptrex Posted April 15, 2010 Posted April 15, 2010 @doudou I appreciate that you can share your idea's and tools. I would be interested in getting it started. But I am overloaded with other projects at the moment. Whenever I see the time available, I will definitely get back in touch to give it a try. See you around ! Rgds, ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
doudou Posted May 2, 2010 Author Posted May 2, 2010 Some bugs were spotted and eliminated (s. top post) 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
doudou Posted May 16, 2010 Author Posted May 16, 2010 Version 1.0.2 released. 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
doudou Posted May 23, 2010 Author Posted May 23, 2010 Just submitted version 1.0.3 of TLI and doc on differences TLI/TLBINF32 (s. top post). 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
doudou Posted July 23, 2010 Author Posted July 23, 2010 Version 1.0.4 released. 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
doudou Posted July 29, 2010 Author Posted July 29, 2010 TLI part upgraded to 1.0.5 (s. top post). 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
junkew Posted May 7, 2011 Posted May 7, 2011 (edited) great tool and also like the AIOWrapperGeneratorQuestion on this one is I am trying to use it on UIAutomationCore.DLL but no result as it cannot find the typelibHowever when I try in Excel 2003 to load this DLL thru external references everything works (early binding like dim C as CUIAutomation is possible) and as such I assume the type library is in the DLL but somehow not accessible with TLI/TLIDirect. Any direction to resolve this with the packages of this thread?Some information from OLE/COM viewer of the WIN32 SDK gives// Generated .IDL file (by the OLE/COM Object Viewer) // // typelib filename: uiautomationcore.dll [ uuid(944DE083-8FB8-45CF-BCB7-C477ACB2F897), version(1.0) ] library UIAutomationClient { // TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046} importlib("stdole2.tlb"); // Forward declare all types defined in this typelib interface IUIAutomationElement; interface IUIAutomationCondition; interface IUIAutomationElementArray; interface IUIAutomationCacheRequest; interface IUIAutomationBoolCondition; interface IUIAutomationPropertyCondition; interface IUIAutomationAndCondition; interface IUIAutomationOrCondition; interface IUIAutomationNotCondition; interface IUIAutomationTreeWalker; ...edit update: Found out my problem as i should have looked at {30CBE57D-D9D0-452A-AB13-7AC5AC4825EE} to put in AIOGenerator[ odl, uuid(30CBE57D-D9D0-452A-AB13-7AC5AC4825EE) ] interface IUIAutomation : IUnknown { HRESULT _stdcall CompareElements( [in] IUIAutomationElement* el1, [in] IUIAutomationElement* el2, [out, retval] long* areSame); HRESULT _stdcall CompareRuntimeIds( [in] SAFEARRAY(int) runtimeId1, [in] SAFEARRAY(int) runtimeId2, [out, retval] long* areSame); HRESULT _stdcall GetRootElement([out, retval] IUIAutomationElement** root);** Would be nice if you could "feed" then generator a dll file (just like oleviewer) and directly makes all output for AutoItObject Edited May 7, 2011 by junkew FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
junkew Posted May 9, 2011 Posted May 9, 2011 (edited) enhanced/changed AIOWrapperGenerator 1. Automatic add * for ByRef Params;added to call byref if BitAnd($PARAMFLAG_FOUT , $objParamInfo.Flags) then $output &= "*" endif ;endadd2. VarType2AIType function changed a little to match better on some unresolved stuff. code 1expandcollapse popupFunc GenerateInterface(ByRef $objTypeInfo) Local $baseInterfaces = "" If $TKIND_DISPATCH <> $objTypeInfo.TypeKind Then For $objBaseInfo In $objTypeInfo.Interfaces GenerateInterface($objBaseInfo) $baseInterfaces &= " $tag" & $objBaseInfo.Name & " &" Next $objBaseInfo = 0 EndIf AppendOutput($g_optDefScope & " $tag" & $objTypeInfo.Name & " =" & $baseInterfaces, 0, 0) Local $methodDoc = "" For $objMethodInfo In $objTypeInfo.Methods Local $output = """" If BitAnd($objMethodInfo.InvokeKind, $INVOKE_PROPERTYGET) Then $output &= "get_" ElseIf BitAnd($objMethodInfo.InvokeKind, $INVOKE_PROPERTYPUT) Then $output &= "put_" ElseIf BitAnd($objMethodInfo.InvokeKind, $INVOKE_PROPERTYPUTREF) Then $output &= "putref_" EndIf Local $objVarTypeInfo = $objMethodInfo.ReturnType $output &= $objMethodInfo.Name & " " & VarType2AIType($objVarTypeInfo, False) & "(" $objVarTypeInfo = 0 For $objParamInfo In $objMethodInfo.Parameters $objVarTypeInfo = $objParamInfo.VarTypeInfo If "(" <> StringRight($output, 1) Then $output &= ";" $output &= VarType2AIType($objVarTypeInfo) ;added to call byref if BitAnd($PARAMFLAG_FOUT , $objParamInfo.Flags) then $output &= "*" endif ;endadd $objVarTypeInfo = 0 Next $objParamInfo = 0 $output &= ");""" AppendOutput($output, 1, 2, $methodDoc) $methodDoc = $objMethodInfo.HelpString Next $objMethodInfo = 0 AppendOutput("") EndFunccode 2expandcollapse popupFunc VarType2AIType(ByRef $varTypeInfo, $asParam = True) If Not IsObj($varTypeInfo) Then Return "INVALID" If 0 < $varTypeInfo.ElementPointerLevel Or 0 < BitAnd($__Au3Obj_VT_BYREF, $varTypeInfo.VarType) Then Return "ptr" Local $type = "URESOLVED_" & $varTypeInfo.VarType Switch $varTypeInfo.VarType ;~ ;NEW Code ;~ based on wtypes.h enum VARENUM ;~ and main.cpp of AIO library (VARTYPE VarType(VARTYPE vtype, LPCWSTR wtype) function) Case $__Au3Obj_VT_EMPTY ;0 VT_EMPTY, // none $type="none" ;~ case $__Au3Obj_VT_NULL ;1 NOT in AIO ;~ $type="byte" case $__Au3Obj_VT_I2 ;2 VT_I2, // short $type="short" case $__Au3Obj_VT_I4 ;3 VT_I4, // long $type="long" case $__Au3Obj_VT_R4 ;4 VT_R4, // float $type="float" case $__Au3Obj_VT_R8 ;5 VT_R8, // double $type="ushort" ;~ case $__Au3Obj_VT_CY ;6 NOT in AIO ;~ $type="word" ;~ case $__Au3Obj_VT_DATE ;7 NOT in AIO ;~ $type="dword" case $__Au3Obj_VT_BSTR ;8 VT_BSTR, // bstr $type="bstr" case $__Au3Obj_VT_DISPATCH ;9 VT_DISPATCH, // idispatch $type="idispatch" ;~ case $__Au3Obj_VT_ERROR ;10 NOT in AIO ;~ $type="long" case $__Au3Obj_VT_BOOL ;11 VT_BOOL, // boolean $type="boolean" case $__Au3Obj_VT_VARIANT ;12 VT_VARIANT, // variant $type="variant" case $__Au3Obj_VT_UNKNOWN ;13 NOT in AIO, assuming a ptr $type="ptr" ;~ case $__Au3Obj_VT_DECIMAL ;14 NOT in AIO ;~ $type="uint64" ;~ case 15 ;15 ** NOT USED ** NOT in AIO ;~ $type="float" case $__Au3Obj_VT_I1 ;16 NOT in AIO $type="byte" case $__Au3Obj_VT_UI1 ;17 $type="byte" case $__Au3Obj_VT_UI2 ;18 $type="ushort" case $__Au3Obj_VT_UI4 ;19 $type="uint" case $__Au3Obj_VT_I8 ;20 $type="int64" case $__Au3Obj_VT_UI8 ;21 VT_UI8, // uint64 $type="uint64" case $__Au3Obj_VT_INT ;22 NOT in AIO, most likely an int $type="int" case $__Au3Obj_VT_UINT ;23 NOT in AIO, most likely an uint $type="uint" case $__Au3Obj_VT_VOID ;24 NOT in AIO, most likely a none $type="none" case $__Au3Obj_VT_HRESULT ;25 maps to VT_UI4 in AIO internally, most likely a hresult in declare $type="hresult" case $__Au3Obj_VT_PTR ;26 $type="ptr" case $__Au3Obj_VT_SAFEARRAY ;27 NOT in AIO? $type="lparam" ;~ case $__Au3Obj_VT_CARRAY ;28 NOT in AIO? ;~ $type="uint_ptr" case $__Au3Obj_VT_USERDEFINED ;29 NOT in AIO, most likely a ptr $type="ptr" case $__Au3Obj_VT_LPSTR ;30 $type = "str" If Not $g_optReturnStrings Then $type = "ptr" case $__Au3Obj_VT_LPWSTR ;31 NOT in AIO, most likely a WSTR $type = "wstr" If Not $g_optReturnStrings Then $type = "ptr" ;~ TODO: unsure how to handle this probably a ptr if the bit is set ;~ 0x2000 VT_ARRAY [V] SAFEARRAY* ;~ 0x4000 VT_BYREF [V] void* for local use ;~ 0x8000 VT_BSTR_BLOB Reserved for system use ;Old Code reshuffled ;~ Case $__Au3Obj_VT_EMPTY, $__Au3Obj_VT_VOID ;0 24 ;~ $type = "none" ;~ Case $__Au3Obj_VT_I2 ;2 ;~ $type = "short" ;~ Case $__Au3Obj_VT_I4, $__Au3Obj_VT_INT ;3 22 ;~ $type = "int" ;~ Case $__Au3Obj_VT_R4 ;4 ;~ $type = "float" ;~ Case $__Au3Obj_VT_R8, $__Au3Obj_VT_DECIMAL ;5 14 ;~ $type = "double" ;~ Case $__Au3Obj_VT_BSTR ;8 ;~ $type = "bstr*" ;~ case $__Au3Obj_VT_LPWSTR ;31 ;~ $type = "wstr" ;~ If Not $g_optReturnStrings Then $type = "ptr" ;~ Case $__Au3Obj_VT_DISPATCH ;9 ;~ $type = "idispatch" ;~ Case $__Au3Obj_VT_BOOL ;11 ;~ $type = "short" ;~ case $__Au3Obj_VT_VARIANT ;12 ;~ $type="variant" ;~ case $__Au3Obj_VT_UNKNOWN ;13 No clue how to handle ;~ $type="ptr" ;~ Case $__Au3Obj_VT_I1, $__Au3Obj_VT_UI1 ;16 17 ;~ $type = "byte" ;~ Case $__Au3Obj_VT_UI2 ;18 ;~ $type = "ushort" ;~ Case $__Au3Obj_VT_UI4, $__Au3Obj_VT_UINT ;19 23 ;~ $type = "uint" ;~ Case $__Au3Obj_VT_I8 ;20 ;~ $type = "int64" ;~ Case $__Au3Obj_VT_UI8 ;21 ;~ $type = "uint64" ;~ Case $__Au3Obj_VT_HRESULT ;25 ;~ $type = "hresult" ;~ case $__Au3Obj_VT_SAFEARRAY ;27 ;~ $type="lparam" ;~ Case $__Au3Obj_VT_USERDEFINED ;29 ;~ Local $objTypeInfo = $varTypeInfo.TypeInfo ;~ If IsObj($objTypeInfo) Then ;~ $type = $objTypeInfo.Name ;~ Switch $objTypeInfo.TypeKind ;~ Case $TKIND_ALIAS ;~ Local $vtiResolved = $objTypeInfo.ResolvedType ;~ $type = VarType2AIType($vtiResolved) ;~ Case $TKIND_ENUM ;~ $type = "int" ;~ EndSwitch ;~ EndIf ;~ $objTypeInfo = 0 ;~ Case $__Au3Obj_VT_INT_PTR ;37 ;~ $type = "int_ptr" ;~ Case $__Au3Obj_VT_UINT_PTR ;38 ;~ $type = "uint_ptr" ;~ Case $__Au3Obj_VT_LPSTR ;30 ;~ $type = "str" ;~ If Not $g_optReturnStrings Then $type = "ptr" EndSwitch Return $type EndFunc Edited May 9, 2011 by junkew FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
doudou Posted January 4, 2012 Author Posted January 4, 2012 Version 1.0.6 released.AIOWrapperGenerator has been improved too (thanks for suggestions, junkew). 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
ValeryVal Posted January 11, 2012 Posted January 11, 2012 AIOWrapperGenerator has been improved tooNote (Windows 7): AIOWrapperGenerator shows message box with text:IFileSystem doesn't seem to be an interface in this TypeLibThank you. The point of world view
doudou Posted January 12, 2012 Author Posted January 12, 2012 Note (Windows 7): AIOWrapperGenerator shows message box with text:IFileSystem doesn't seem to be an interface in this TypeLibThis message is normal if interface or typelib isn't properly registered on the system, try a different one (use OleView or TypeLibInspector to find a valid interface) 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
ValeryVal Posted January 12, 2012 Posted January 12, 2012 (edited) This message is normal if interface or typelib isn't properly registered on the system, try a different one (use OleView or TypeLibInspector to find a valid interface)The IFileSystem interface is defined in Microsoft Scripting Runtime TypeLib (Windows 7).TypeLibInspector can open this library and shows IFileSystem definition.CoClassFileSystemObject--------------------------------------------------------------------------------FileSystem ObjectDefined in: ScriptingProgID: Scripting.FileSystemObjectGUID: {0D43FE01-F093-11CF-8940-00A0C9054228}Version: 0.0AttributesTYPEFLAG_FCANCREATEInstances of the type can be created by ITypeInfo::CreateInstance.--------------------------------------------------------------------------------InterfacesIFileSystem3It shows about IFileSystem3 the following:DispInterfaceIFileSystem3--------------------------------------------------------------------------------FileSystemObjectDefined in: ScriptingGUID: {2A0B9D10-4B87-11D3-A97A-00104B365C9F}Version: 0.0AttributesTYPEFLAG_FDUALThe types in the interface derive from IDispatch and are fully compatible with Automation.TYPEFLAG_FNONEXTENSIBLEThe interface cannot add members at run time.TYPEFLAG_FDISPATCHABLEThe interface derives from IDispatch, either directly or indirectly.--------------------------------------------------------------------------------Properties (Indirect)Drives()MethodsBuildPath(Path, Name)Registry has records with FileSystemObject and scrrun.dllTypeLibInspector exposes about TypeLib Scripting:Microsoft Scripting RuntimeLCID: 0Target system: Win32Source: C:\Windows\System32\scrrun.dllGUID: {420B2830-E718-11CF-893D-00A0C9054228}Version: 1.0AttributesLIBFLAG_FHASDISKIMAGEThe type library exists in a persisted form on disk.BTW I've also tried IFileSystem3 wrapping by AIOWrapperGenerator.au3 without success. Edited January 12, 2012 by ValeryVal The point of world view
doudou Posted January 13, 2012 Author Posted January 13, 2012 The IFileSystem interface is defined in Microsoft Scripting Runtime TypeLib (Windows 7).TypeLibInspector can open this library and shows IFileSystem definition.You may try to load the interface in AIOWrapper directly by GUID, if it fails there again... well, that means that registry structures in Win7 don't match. I am planning to integrate AIOWrapper functionality into TypeLibInspector anyway, that is don't feel like spending much time on debugging. You are of course welcome to investigate and to share your findings. 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
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