﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1056	"InetGet rundll32.exe error on Vista / Windows 7 on ""Screen-saver"" desktop"	caplant@…	Valik	"InetGet(""valid url"") generates an error window: 
""rundll32.exe - Application Error""
""The application failed to initilize properly (0xc0000142). Click OK to terminate the application.""

The issue only occurs on Windows Vista or Windows 7 when the system is displaying the ""Screen-saver"" desktop.
To duplicate the error:
1. Compile this script 

{{{

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $getting = 0
Global $windowinfodata = 0
_EnumDesktops()

GUICreate(Default,400,280)
$url = ""http://www.irs.gov/pub/irs-pdf/fw4.pdf""
$label = GUICtrlCreateLabel(""No Results"",10,10,200,50)
$label2 = GUICtrlCreateLabel($windowinfodata,220,10,150,300)
$input = GUICtrlCreateInput($url,10,120,350,25)
$buttonI = GUICtrlCreateButton(""InetGet Input"", 10, 150)
$buttonP = GUICtrlCreateButton(""Run Input"", 10, 180)
$buttonIE = GUICtrlCreateButton(""Run Internet Explorer"", 10, 210)
$buttonD = GUICtrlCreateButton(""Get Desktops"", 10, 240)
GUISetState(@SW_SHOW)

; Run the GUI until the dialog is closed
While 1
	$msg = GUIGetMsg()
	Select
	Case $msg = $GUI_EVENT_CLOSE 
		GUIDelete()	
		Exit
	Case $msg = $buttonD
		GUICtrlSetData($label2, """")
		Sleep(100)
		_EnumDesktops()
		GUICtrlSetData($label2, $windowinfodata)
	Case $msg = $buttonI
		$url = GUICtrlRead($input)
		$new = InetGet($url,@TempDir & ""\"" & StringMid($url,StringInStr($url,""/"",0,-1)+1),1,1)
		$getting = 1
		GUICtrlSetData($label, $new)
	Case $msg = $buttonP
		$url = GUICtrlRead($input)
		$new = Run($url)
		GUICtrlSetData($label, ""ProcessID: "" & $new)
	Case $msg = $buttonIE
		$new = Run(""C:\Program Files\Internet Explorer\iexplore.exe"")
		GUICtrlSetData($label, ""ProcessID: "" & $new)
	Case Else
		;nothing
	EndSelect
	If $getting = 1 Then
		GUICtrlSetData($label, @InetGetBytesRead)
		If @InetGetActive = 0 Then
			$getting = 0
			GUICtrlSetData($label, @InetGetBytesRead & "" done."")
		EndIf	
	EndIf
WEnd
GUIDelete()
Exit

;enum desktops
Func _EnumDesktops()
	$windowinfodata = """"
	$HWNDWindowStation = DllCall(""user32.dll"", ""HWnd"", ""GetProcessWindowStation"")
	$handle2 =  DLLCallbackRegister(""_EnumDesktopProc"", ""int"", ""str;lParam"")     
	DllCall(""user32.dll"", ""int"", ""EnumDesktops"", ""HWnd"", $HWNDWindowStation[0], ""ptr"", DllCallbackGetPtr($handle2), ""lparam"", 10)
EndFunc

Func _EnumDesktopProc($lpszDesktop, $lParam)
	$windowinfodata = ""Desktop: "" & $lpszDesktop & @CRLF & $windowinfodata
	Return 1
EndFunc

}}}

2. Rename the script from .exe to .scr.
3. Copy the script to C:\Windows\System32\
4. In C:\Windows\System32\ Right-click on the script scr & select install.
5. Close the script when it runs.
6. In Screen Saver Settings check On resume, display logon screen.
7. Close Screen Saver Settings and wait for screen saver to start.
8. Click InetGet Input.
9. Error 0xc0000142 should be displayed.

I have tested with Vista / Windows 7 / IE7 / IE8 / AutoIt 3.3.0.0 / AutoIt 3.3.1.1 all fail.
It does not error on Windows XP.
Stumbled across this while implamenting automatic update functionality into a screen saver.
The ""Screen-saver"" desktop is created only when ""On resume, display logon screen"" is checked.

"	Bug	closed	3.3.1.5	AutoIt	3.3.0.0	Blocking	Completed		
