关于SkinCrafterDll.dll和 _IECreate的冲突!(已解决,G版高人也)
本帖最后由 gzh888666 于 2010-12-6 15:16 编辑发现一个问题,当使用SkinCrafterDll.dll皮肤时,打开GUI,如果使用_IECreate弹出网址,再去关闭GUI 就会弹出内存错误,不能为read
俺是个初学者,对IE的自定义函数还看不懂,希望高手指点,很诡异的是在虚拟机里不报内存错误,我还以为是我机器的问题,交给朋友测试同样内存报错。
大家可以测试一下,我把皮肤也打包了一下,打开GUI以后点网址,弹出以后再去关闭GUI!#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=Form1.kxf
Dim $dll
FileInstall("SkinCrafterDll.dll", @TempDir & "\SkinCrafterDll.dll", 1)
FileInstall("Accent.skf", @TempDir & "\Accent.skf", 1)
$Form1 = GUICreate("Form1", 218, 116, 192, 124)
Dim $bf = @TempDir & "\Accent.skf"
_SkinGUI(@TempDir & "\SkinCrafterDll.dll", $bf, $Form1)
$Button1 = GUICtrlCreateButton("网址", 104, 56, 75, 25)
$Label1 = GUICtrlCreateLabel("网址", 32, 24, 28, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_IECreate("http://baidu.com",0,1,0,-1)
Case $Label1
_IECreate("http://baidu.com",0,1,0,-1)
EndSwitch
WEnd
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle)
$dll = DllOpen($SkincrafterDll)
DllCall($dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1")
DllCall($dll, "int:cdecl", "InitDecoration", "int", 1)
DllCall($dll, "int:cdecl", "LoadSkinFromFile", "wstr", $SkincrafterSkin)
DllCall($dll, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25)
DllCall($dll, "int:cdecl", "ApplySkin")
EndFunc ;==>_SkinGUI
Func Quit()
GUISetState(@SW_HIDE)
DllCall($dll, "int:cdecl", "DeInitDecoration")
DllCall($dll, "int:cdecl", "RemoveSkin")
DllClose($dll)
FileDelete(@TempDir & "\SkinCrafterDll.dll")
FileDelete(@TempDir & "\Accent.skf")
Exit
EndFunc ;==>Quit
我也看不懂,但帮你测试了一下,WIN7x86专业版,IE8,弹出IE后不管关不关IE,关闭GUI后一会,都会提示AUTOIT 3 停止响应 高手来看看吧!自己顶! 回复 1# gzh888666
真不知道你们是怎么看的教程........Case $GUI_EVENT_CLOSE
Quit() G版高人也,不过还是不太明白,Exit为什么就会报错呢?教程里没找到,可能是我们这些菜鸟们还不会正确使用帮助!谢谢G版 感谢分享{:face (288):}
页:
[1]