Administrators Jon Posted January 4, 2014 Administrators Share Posted January 4, 2014 File Name: AutoIt v3.3.11.1 BetaFile Submitter: JonFile Submitted: 04 Jan 2014File Category: Beta3.3.11.1 (4th January, 2014) (Beta) AutoIt: - Fixed: Stack overflow with deep nested includes. - Fixed: FileSelectFolder() not working correctly with title and root parameters. - Fixed: StringIsSpace() for null characters. - Fixed #2478: Assign() and Eval() do not restrict variable names. UDFs: - Changed: Constant variables are now used in the UDFs rather than their value. Notes for Windows 8 Users When multiple programs register the same file associations (Stable+beta) then we can no longer toggle between beta and stable versions programatically. You must select a .au3 file, right-click and choose "open with", then "choose default program" and select beta or stable. Use the following script to verify which version you are running:MsgBox(0, "Version", @AutoItVersion)Click here to download this file Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Richard Robertson Posted January 4, 2014 Share Posted January 4, 2014 I am amused by the bug about variable names. Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 4, 2014 Author Administrators Share Posted January 4, 2014 I'm sure someone will be along to moan about it shortly. Some were using it to create weird and wonderful mappings and inaccessible variables. I just slapped it with a regex to validate it now. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
FaridAgl Posted January 4, 2014 Share Posted January 4, 2014 Thank you Jon. http://faridaghili.ir Link to comment Share on other sites More sharing options...
guinness Posted January 4, 2014 Share Posted January 4, 2014 I'm sure someone will be along to moan about it shortly. Some were using it to create weird and wonderful mappings and inaccessible variables. I just slapped it with a regex to validate it now. I knew it was coming UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Xerix Posted January 4, 2014 Share Posted January 4, 2014 Hello I'm not an expert on Autoit but I think there is a problem with the _ArrayFindAll function This script works on 3.3.10.2 and return 4 #include <Array.au3> Local $avArray[5] = [0, 1, 2, 1, 0] Local $aiResult = _ArrayFindAll($avArray, 0) msgbox(4096,"",$aiResult[1]) But on 3.3.11.1 i have : "e:UsersUSERDesktop_ArrayFindAll.au3" (5) : ==> Subscript used on non-accessible variable.: msgbox(4096,"",$aiResult[1]) msgbox(4096,"",$aiResult^ ERROR Thank you Eric Link to comment Share on other sites More sharing options...
guinness Posted January 4, 2014 Share Posted January 4, 2014 Hello I'm not an expert on Autoit but I think there is a problem with the _ArrayFindAll function This script works on 3.3.10.2 and return 4 #include <Array.au3> Local $avArray[5] = [0, 1, 2, 1, 0] Local $aiResult = _ArrayFindAll($avArray, 0) msgbox(4096,"",$aiResult[1]) But on 3.3.11.1 i have : "e:UsersUSERDesktop_ArrayFindAll.au3" (5) : ==> Subscript used on non-accessible variable.: msgbox(4096,"",$aiResult[1]) msgbox(4096,"",$aiResult^ ERROR Thank you Eric Fixed. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Mat Posted January 4, 2014 Share Posted January 4, 2014 - Fixed: FileSelectFolder() not working correctly with title and root parameters. Looks good. I'll play around with it and update the docs if needs be. If people want to use assign and eval for variable names that won't be used in code then they can just use a variable name that's over 4000 characters long. AutoIt Project Listing Link to comment Share on other sites More sharing options...
UEZ Posted January 4, 2014 Share Posted January 4, 2014 Thanks Jon, compile issue is fixed now. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Mat Posted January 4, 2014 Share Posted January 4, 2014 The parent window parameter for the vista style dialog doesn't behave the same as the old style. With the old style the parent window would be disabled. With the new style this isn't the case. I've added the following sentence to the docs: The new vista+ dialog style is used if possible, regardless of the Use New Dialog Style flag. With the vista dialog style the edit control and create folder buttons are always shown, ignoring the flags parameter, and the dialog text parameter sets the title of the window. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 4, 2014 Author Administrators Share Posted January 4, 2014 Yeah, there didn't seem to be an option to pass a parent window. I could be mistaken though - like with the title Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Mat Posted January 4, 2014 Share Posted January 4, 2014 Yeah, there didn't seem to be an option to pass a parent window. I could be mistaken though - like with the title The IModalWindow::Show method takes a hwnd parameter. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 4, 2014 Author Administrators Share Posted January 4, 2014 The IModalWindow::Show method takes a hwnd parameter. Doh, of course. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
guinness Posted January 4, 2014 Share Posted January 4, 2014 StringStripWS() works but StringIsSpace() doesn't treat Null as whitespace. Unless I am missing something.Local Const $STR_STRIPALL = 8 Local Const $NULL = Chr(0) ConsoleWrite(StringReplace(StringStripWS($NULL, $STR_STRIPALL), $NULL, 'Null') & @CRLF) ; Works ConsoleWrite(StringIsSpace(String($NULL)) & @CRLF) ; Doesn't work.Fixed. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
trancexx Posted January 4, 2014 Share Posted January 4, 2014 This new version of FileSelectFolder returns different names (different format) for some selections than older version, for example for Homegroup, Computer, Control Panel, etc. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
trancexx Posted January 4, 2014 Share Posted January 4, 2014 And that ObjName bug report that got closed as "works for me" is really a bug. You don't just copy/paste the code and run to test it because the reporter didn't use code tags so link was altered by trac. Copy paste this: $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("GET", "http://www.autoitscript.com/forum/", False) $oHTTP.Send() $vRet = $oHTTP.ResponseStream() ObjName($vRet) ObjName doesn't check if object is IDispatch, that's why it crashes. I case of IUnknown function can't be run for flag 7 and for all other flags it can if QueryInterface for IID_IProvideClassInfo succeeds. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
guinness Posted January 5, 2014 Share Posted January 5, 2014 (edited) I'm sure someone will be along to moan about it shortly. Some were using it to create weird and wonderful mappings and inaccessible variables. I just slapped it with a regex to validate it now. lt can still be done with the latest beta, though it's not breaking variable convention. Local Const $sVariable = 'Test_Me_I_Am + Variable' Local Const $bVariable = StringToBinary($sVariable) ; & '***' ; Uncomment to see it fail in the latest beta. Assign($bVariable, $sVariable) ConsoleWrite('Is valid?: ' & (StringRegExp($bVariable, '[^A-Za-z0-9_]') = 0) & @CRLF) ConsoleWrite('Is declared?: ' & IsDeclared($bVariable) & @CRLF) ConsoleWrite('Find value of Var: ' & Eval($bVariable) & @CRLF) Edited January 5, 2014 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
trancexx Posted January 5, 2014 Share Posted January 5, 2014 (edited) http://www.autoitscript.com/trac/autoit/ticket/2316 is also bug. Jon there is a function called Object_SinkInfo in utility_COM.cpp where it's checked that IDispatch kind is TKIND_DISPATCH. The problem is that it should also be checked if typekind is maybe dual or dispatchable too, because all three are good to go. Something like this: //... // Collect wanted TYPEKIND iSinkKind = pTypeAttr->typekind; // Dual and dispatchable interfaces are also allowed because they must "support" IDispatch by definition if (pTypeAttr->wTypeFlags & (TYPEFLAG_FDUAL | TYPEFLAG_FDISPATCHABLE)) iSinkKind = allowedKind; // correct read kind to pass "if" condition few lines below //... Edited January 5, 2014 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 5, 2014 Author Administrators Share Posted January 5, 2014 Ta, I'll try and have a look later. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 5, 2014 Author Administrators Share Posted January 5, 2014 (edited) ObjName doesn't check if object is IDispatch, that's why it crashes. I case of IUnknown function can't be run for flag 7 and for all other flags it can if QueryInterface for IID_IProvideClassInfo succeeds. I added a check to do a QueryInterface for IDispatch at the top of the code and set a flag. HRESULT hr = pUnk->QueryInterface(IID_IDispatch, reinterpret_cast<LPVOID*>(&pDisp)); if (SUCCEEDED(hr)) { // QueryInterface will have increase the ref count on the object, we only wanted to verify it was IDispatch // so reduce ref count straight away. bHasIDispatch = true; pDisp->Release(); } But it's actually crashing on the QueryInterface for IID_IProvideClassInfo so I'm not even getting far enough to perform the check. Edit: Ignore that, I've made a mistake later on. Let me recheck. Edited January 5, 2014 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ 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